Sha256: b3b0d47105b7448684539241372fbc6403c4326d1f6712f2f7e3e5fbe314bb8e

Contents?: true

Size: 307 Bytes

Versions: 73

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

73 entries across 57 versions & 15 rubygems

Version Path
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
mumukit-content-type-1.11.1 vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
tdiary-5.1.5 vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
tdiary-5.1.4 vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
tdiary-5.1.3 vendor/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/core_ext/regexp.rb
tdiary-5.1.3 vendor/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/core_ext/regexp.rb