Skip to content

Commit

Permalink
Fix issue with configatron broken on JRuby with 1.9 model
Browse files Browse the repository at this point in the history
  • Loading branch information
Gleb Pomykalov committed Nov 15, 2011
1 parent 750f7ae commit 2dc7c0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2dc7c0b

Please sign in to comment.