diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-08 02:32:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-08 02:32:06 +0000 |
commit | 3a45ac8af15bf5b6074820b02ef9e50e0717fa3c (patch) | |
tree | c1d8fecebabf0fb6a1182305e0b794ea0e9ad17a /lib/yaml.rb | |
parent | f571492922083d0a02d2dc5ee5125af52935d5cd (diff) |
* lib/yaml.rb (YAML::EngineManager#yamler): set the result after
successfully switched.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/yaml.rb')
-rw-r--r-- | lib/yaml.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/yaml.rb b/lib/yaml.rb index 28e13fe05f..b1c6a70dde 100644 --- a/lib/yaml.rb +++ b/lib/yaml.rb @@ -13,7 +13,6 @@ module YAML def yamler= engine raise(ArgumentError, "bad engine") unless %w{syck psych}.include?(engine) - @yamler = engine require engine Object.class_eval <<-eorb, __FILE__, __LINE__ + 1 @@ -22,6 +21,8 @@ module YAML remove_method :to_yaml alias :to_yaml :#{engine}_to_yaml eorb + + @yamler = engine engine end end |