diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-30 16:27:52 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-30 16:27:52 +0000 |
commit | 952beb5ff4a866a012fb646bf598ae112acdfb82 (patch) | |
tree | dd4f74a0e37169cef6d22671b2070e8e9c5ef551 /lib/rubygems/requirement.rb | |
parent | 4bb1bfa0ed10a3a1e2ca04ada24d72e0227ebce7 (diff) | |
download | ruby-952beb5ff4a866a012fb646bf598ae112acdfb82.tar.gz |
* lib/rubygems/command.rb (Gem::Command#get_all_gem_names_and_versions):
who assumes that the pathname of a gem never contains ':' ?
yes, on Unixen pathnames can contain ':', and on Windows they almost
certainly contain ':'. see [ruby-core:50388].
* lib/rubygems/requirement.rb (Gem::Requirement::PATTERN_RAW): extract
the regexp to match the version specifier from PATTERN to use in
above method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/requirement.rb')
-rw-r--r-- | lib/rubygems/requirement.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rubygems/requirement.rb b/lib/rubygems/requirement.rb index b80e8dca19..ed768924a8 100644 --- a/lib/rubygems/requirement.rb +++ b/lib/rubygems/requirement.rb @@ -27,7 +27,8 @@ class Gem::Requirement } quoted = OPS.keys.map { |k| Regexp.quote k }.join "|" - PATTERN = /\A\s*(#{quoted})?\s*(#{Gem::Version::VERSION_PATTERN})\s*\z/ + PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{Gem::Version::VERSION_PATTERN})\\s*" + PATTERN = /\A#{PATTERN_RAW}\z/ DefaultRequirement = [">=", Gem::Version.new(0)] |