diff options
author | Hiroshi SHIBATA <[email protected]> | 2023-04-04 12:03:13 +0900 |
---|---|---|
committer | git <[email protected]> | 2023-04-04 12:20:43 +0000 |
commit | a881b33818b101ad097cd0158afda11b6c24f1fc (patch) | |
tree | 73111721667233a91e214e4df703d91ab19cfded /lib/rubygems/version.rb | |
parent | a78e0ca968115cbf57228cf2c026d2e21534dc7b (diff) |
[rubygems/rubygems] util/rubocop -A --only Performance/RegexpMatch
https://github.com/rubygems/rubygems/commit/52ae4452c2
Diffstat (limited to 'lib/rubygems/version.rb')
-rw-r--r-- | lib/rubygems/version.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/version.rb b/lib/rubygems/version.rb index 8fc4e1b327..3d8e11b515 100644 --- a/lib/rubygems/version.rb +++ b/lib/rubygems/version.rb @@ -405,7 +405,7 @@ class Gem::Version # since this version object is cached in @@all, its @segments should be frozen @segments ||= @version.scan(/[0-9]+|[a-z]+/i).map do |s| - /^\d+$/ =~ s ? s.to_i : s + /^\d+$/.match?(s) ? s.to_i : s end.freeze end |