Permalink
Browse files

Fix issue with configatron broken on JRuby with 1.9 model

  • Loading branch information...
1 parent 750f7ae commit 2dc7c0b1f345b332eac280961cf49693eec6a544 Gleb Pomykalov committed Nov 15, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/configatron/store.rb
@@ -1,6 +1,6 @@
class Configatron
class Store
- if RUBY_VERSION.match(/^1\.9\.[^1]/)
+ if RUBY_VERSION.match(/^1\.9\.[^1]/) && RUBY_PLATFORM != 'java'
require 'syck'
::YAML::ENGINE.yamler = 'syck'
end
@@ -321,11 +321,11 @@ def parse_options(options)
undef :test # :nodoc:
rescue Exception => e
end
-
+
if RUBY_PLATFORM == 'java'
SYCK_CONSTANT = YAML::Yecht::MergeKey
else
- SYCK_CONSTANT = (RUBY_VERSION.match(/^1\.9/) ? Syck::MergeKey : YAML::Syck::MergeKey)
+ SYCK_CONSTANT = (RUBY_VERSION.match(/^1\.9/) ? Syck::MergeKey : YAML::Syck::MergeKey)
end
end # Store

0 comments on commit 2dc7c0b

Please sign in to comment.