diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-26 07:13:53 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-26 07:13:53 +0000 |
commit | f7e94df0d66aff47745d189ab5a7858a92233d57 () | |
tree | c332ba2a435a669f26b3c5b71c91a4c756547f79 /lib | |
parent | 0edc36b9f25e7b92c40d91858dfe4ef2bd06f796 (diff) |
lib/rubygems: explicitly clarify the type for =~ matching
RubyGems is very indifferent for type. This change is needed for removal of `Object#=~`. [Feature #15231] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/rubygems/command.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/version.rb | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -361,7 +361,7 @@ class Gem::Command def remove_option(name) @option_groups.each do |_, option_list| - option_list.reject! { |args, _| args.any? { |x| x =~ /^#{name}/ } } end end @@ -213,7 +213,7 @@ class Gem::Version end # If version is an empty string convert it to 0 - version = 0 if version =~ /\A\s*\Z/ @version = version.to_s.strip.gsub("-",".pre.") @segments = nil |