diff options
-rw-r--r-- | lib/rack/core_ext/regexp.rb | 10 |
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 |