summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2019-11-14 16:50:41 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2019-11-14 16:50:41 -0800
commit6e90ea0d55330726b4c13c954f2500c9f85df42e (patch)
treeadc11ba64b03a11b7c1e63e875381ed223c9685a
parented492fed17ab1db93ca6f0ab105b9ecdbec83cf8 (diff)
downloadrack-6e90ea0d55330726b4c13c954f2500c9f85df42e.tar.gz
Remove implicit dependency on RubyGems
We should avoid adding new dependencies, including RubyGems. This commit just avoids using the `Gem` constant so don't need RubyGems.
-rw-r--r--lib/rack/core_ext/regexp.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/rack/core_ext/regexp.rb b/lib/rack/core_ext/regexp.rb
index 02975345..a32fcdf6 100644
--- a/lib/rack/core_ext/regexp.rb
+++ b/lib/rack/core_ext/regexp.rb
@@ -5,12 +5,10 @@
module Rack
module RegexpExtensions
- if Gem::Version.new(RUBY_VERSION) < Gem::Version.new(2.4)
- refine Regexp do
- def match?(string, pos = 0)
- !!match(string, pos)
- end unless //.respond_to?(:match?)
+ refine Regexp do
+ def match?(string, pos = 0)
+ !!match(string, pos)
end
- end
+ end unless //.respond_to?(:match?)
end
end