зеркало из https://github.com/github/ruby.git
* 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:
Родитель
3a45ac8af1
Коммит
23d104a161
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче