mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/yaml.rb: use Psych if only it is loaded already.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3a45ac8af1
commit
23d104a161
2 changed files with 6 additions and 2 deletions
|
@ -1,4 +1,6 @@
|
|||
Thu Apr 8 11:31:37 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Thu Apr 8 11:45:14 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/yaml.rb: use Psych if only it is loaded already.
|
||||
|
||||
* lib/yaml.rb (YAML::EngineManager#yamler): set the result after
|
||||
successfully switched.
|
||||
|
|
|
@ -30,6 +30,8 @@ module YAML
|
|||
ENGINE = YAML::EngineManager.new
|
||||
end
|
||||
|
||||
engine = (!defined?(Syck) && defined?(Psych) ? 'psych' : 'syck')
|
||||
|
||||
module Syck
|
||||
ENGINE = YAML::ENGINE
|
||||
end
|
||||
|
@ -38,4 +40,4 @@ module Psych
|
|||
ENGINE = YAML::ENGINE
|
||||
end
|
||||
|
||||
YAML::ENGINE.yamler = 'syck'
|
||||
YAML::ENGINE.yamler = engine
|
||||
|
|
Loading…
Reference in a new issue