From 3a45ac8af15bf5b6074820b02ef9e50e0717fa3c Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 8 Apr 2010 02:32:06 +0000 Subject: * 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 --- lib/yaml.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3