Sha256: b3b0d47105b7448684539241372fbc6403c4326d1f6712f2f7e3e5fbe314bb8e

Contents?: true

Size: 307 Bytes

Versions: 71

Compression:

Stored size: 307 Bytes

Contents

# frozen_string_literal: true

# Regexp has `match?` since Ruby 2.4
# so to support Ruby < 2.4 we need to define this method

module Rack
  module RegexpExtensions
    refine Regexp do
      def match?(string, pos = 0)
        !!match(string, pos)
      end
    end unless //.respond_to?(:match?)
  end
end

Version data entries

71 entries across 56 versions & 14 rubygems

Version Path
rack-2.2.10 lib/rack/core_ext/regexp.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/rack-2.2.9/lib/rack/core_ext/regexp.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/rack-2.2.7/lib/rack/core_ext/regexp.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/rack-2.2.7/lib/rack/core_ext/regexp.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/rack-2.2.7/lib/rack/core_ext/regexp.rb
rack-2.2.9 lib/rack/core_ext/regexp.rb
rack-2.2.8.1 lib/rack/core_ext/regexp.rb
rack-2.1.4.4 lib/rack/core_ext/regexp.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rack-2.2.7/lib/rack/core_ext/regexp.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rack-2.2.4/lib/rack/core_ext/regexp.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
rack-2.2.8 lib/rack/core_ext/regexp.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rack-2.2.7/lib/rack/core_ext/regexp.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rack-2.2.4/lib/rack/core_ext/regexp.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rack-2.2.5/lib/rack/core_ext/regexp.rb
rack-2.2.7 lib/rack/core_ext/regexp.rb
rack-2.2.6.4 lib/rack/core_ext/regexp.rb
rack-2.2.6.3 lib/rack/core_ext/regexp.rb
rack-2.1.4.3 lib/rack/core_ext/regexp.rb