diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-05 13:42:45 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-05 13:42:45 +0000 |
commit | c3546c76c8f1c9d61e65d08e8b2dfca2e2098736 (patch) | |
tree | 6f3288db1b5970c4d4c65d7736719ef15b44a328 /lib/rubygems/specification.rb | |
parent | 69be3620302aab57c43014aca08629c9d7b7ce44 (diff) | |
download | ruby-c3546c76c8f1c9d61e65d08e8b2dfca2e2098736.tar.gz |
* lib/rubygems: Update to RubyGems HEAD(5c3b6f3).
Fixed #1156, #1142, #1115, #1142, #1139 on rubygems/rubygems
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/specification.rb')
-rw-r--r-- | lib/rubygems/specification.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 631bb7a0d3..eb89c4c97b 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -1028,8 +1028,8 @@ class Gem::Specification < Gem::BasicSpecification file = file.dup.untaint return unless File.file?(file) - spec = LOAD_CACHE[file] - return spec if spec + _spec = LOAD_CACHE[file] + return _spec if _spec code = if defined? Encoding File.read file, :mode => 'r:UTF-8:-' @@ -1040,15 +1040,15 @@ class Gem::Specification < Gem::BasicSpecification code.untaint begin - spec = eval code, binding, file + _spec = eval code, binding, file - if Gem::Specification === spec - spec.loaded_from = File.expand_path file.to_s - LOAD_CACHE[file] = spec - return spec + if Gem::Specification === _spec + _spec.loaded_from = File.expand_path file.to_s + LOAD_CACHE[file] = _spec + return _spec end - warn "[#{file}] isn't a Gem::Specification (#{spec.class} instead)." + warn "[#{file}] isn't a Gem::Specification (#{_spec.class} instead)." rescue SignalException, SystemExit raise rescue SyntaxError, Exception => e @@ -1350,7 +1350,7 @@ class Gem::Specification < Gem::BasicSpecification end unless dependency.respond_to?(:name) && - dependency.respond_to?(:version_requirements) + dependency.respond_to?(:requirement) dependency = Gem::Dependency.new(dependency.to_s, requirements, type) end |