aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/specification.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-27 03:35:51 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-27 03:35:51 +0000
commitb0bc5635504faa851742ec056a9875fadf2fdcbc (patch)
tree994d96f273f0769f0d0b512ebef639b705ef4176 /lib/rubygems/specification.rb
parent68bc5ba1b6695f80623441cb60436801add42757 (diff)
downloadruby-b0bc5635504faa851742ec056a9875fadf2fdcbc.tar.gz
* lib/rubygems/specification.rb: fixed broken condition caused
by removing YAML::ENGINE. * lib/rubygems/package/old.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/specification.rb')
-rw-r--r--lib/rubygems/specification.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index f4e609a5eb..d760ab4a83 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -2359,7 +2359,8 @@ class Gem::Specification < Gem::BasicSpecification
end
def to_yaml(opts = {}) # :nodoc:
- if YAML.const_defined?(:ENGINE) && !YAML::ENGINE.syck? then
+ if (YAML.const_defined?(:ENGINE) && !YAML::ENGINE.syck?) ||
+ (defined?(Psych) && YAML == Psych) then
# Because the user can switch the YAML engine behind our
# back, we have to check again here to make sure that our
# psych code was properly loaded, and load it if not.