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 | |
parent | f571492922083d0a02d2dc5ee5125af52935d5cd (diff) | |
download | ruby-3a45ac8af15bf5b6074820b02ef9e50e0717fa3c.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/yaml.rb | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Thu Apr 8 11:31:37 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/yaml.rb (YAML::EngineManager#yamler): set the result after + successfully switched. + Thu Apr 8 07:22:05 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> * random.c (rand_init): ignore higher bits if all they are same as 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 |