aboutsummaryrefslogtreecommitdiff
path: root/lib/leap_cli/config/object.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-06-19 17:51:24 -0700
committerelijah <elijah@riseup.net>2013-06-19 17:51:24 -0700
commit23aa42d957294b025a367c543cd99f137c48e289 (patch)
treedba6247f616c72cf9b737d7a47b837498449b685 /lib/leap_cli/config/object.rb
parent5675bd54cf7dc11a234bb305c64c801c4eeaea62 (diff)
downloadleap_cli-23aa42d957294b025a367c543cd99f137c48e289.tar.gz
leap_cli-23aa42d957294b025a367c543cd99f137c48e289.tar.bz2
fixed utf8 bug when locale not set, and improved testing for ruby 1.8.
Diffstat (limited to 'lib/leap_cli/config/object.rb')
-rw-r--r--lib/leap_cli/config/object.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/leap_cli/config/object.rb b/lib/leap_cli/config/object.rb
index b88c7b4..1edef3f 100644
--- a/lib/leap_cli/config/object.rb
+++ b/lib/leap_cli/config/object.rb
@@ -1,7 +1,9 @@
require 'erb'
require 'json/pure' # pure ruby implementation is required for our sorted trick to work.
-$KCODE = 'UTF8' unless RUBY_VERSION > "1.9.0"
+if $ruby_version < [1,9]
+ $KCODE = 'UTF8'
+end
require 'ya2yaml' # pure ruby yaml
require 'leap_cli/config/macros'