Sha256: ed2fc755152927f63a70fdf8a0a47d4e76b7a860bfb2d5d5e4a5d78b166140c7

Contents?: true

Size: 239 Bytes

Versions: 182

Compression:

Stored size: 239 Bytes

Contents

module Regexp::Expression
  class Base
    def match?(string)
      !!match(string)
    end
    alias :matches? :match?

    def match(string, offset = 0)
      Regexp.new(to_s).match(string, offset)
    end
    alias :=~ :match
  end
end

Version data entries

182 entries across 165 versions & 27 rubygems

Version Path
regexp_parser-1.6.0 lib/regexp_parser/expression/methods/match.rb
regexp_parser-1.5.1 lib/regexp_parser/expression/methods/match.rb