mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
f571492922
commit
3a45ac8af1
2 changed files with 7 additions and 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>
|
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
|
* random.c (rand_init): ignore higher bits if all they are same as
|
||||||
|
|
|
@ -13,7 +13,6 @@ module YAML
|
||||||
def yamler= engine
|
def yamler= engine
|
||||||
raise(ArgumentError, "bad engine") unless %w{syck psych}.include?(engine)
|
raise(ArgumentError, "bad engine") unless %w{syck psych}.include?(engine)
|
||||||
|
|
||||||
@yamler = engine
|
|
||||||
require engine
|
require engine
|
||||||
|
|
||||||
Object.class_eval <<-eorb, __FILE__, __LINE__ + 1
|
Object.class_eval <<-eorb, __FILE__, __LINE__ + 1
|
||||||
|
@ -22,6 +21,8 @@ module YAML
|
||||||
remove_method :to_yaml
|
remove_method :to_yaml
|
||||||
alias :to_yaml :#{engine}_to_yaml
|
alias :to_yaml :#{engine}_to_yaml
|
||||||
eorb
|
eorb
|
||||||
|
|
||||||
|
@yamler = engine
|
||||||
engine
|
engine
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue