mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Merge rubygems master@221bdea
* Fixed https://github.com/rubygems/rubygems/pull/2506 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3b871be4b2
commit
a94cbf81e1
2 changed files with 11 additions and 1 deletions
|
@ -2693,7 +2693,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|||
@version = Gem::Version.create(version)
|
||||
# skip to set required_ruby_version when pre-released rubygems.
|
||||
# It caused to raise CircularDependencyError
|
||||
if @version.prerelease? && @name.strip != "rubygems"
|
||||
if @version.prerelease? && (@name.nil? || @name.strip != "rubygems")
|
||||
self.required_rubygems_version = '> 1.3.1'
|
||||
end
|
||||
invalidate_memoized_attributes
|
||||
|
|
|
@ -1345,6 +1345,16 @@ dependencies: []
|
|||
assert_equal '/path/to/file', e.file_path
|
||||
end
|
||||
|
||||
def test_initialize_prerelease_version_before_name
|
||||
spec = Gem::Specification.new do |s|
|
||||
s.version = '1.0.0.dev'
|
||||
s.name = 'a'
|
||||
end
|
||||
|
||||
assert_equal "a", spec.name
|
||||
assert_equal "1.0.0.dev", spec.version.to_s
|
||||
end
|
||||
|
||||
def test__dump
|
||||
@a2.platform = Gem::Platform.local
|
||||
@a2.instance_variable_set :@original_platform, 'old_platform'
|
||||
|
|
Loading…
Reference in a new issue