class Regexp

Public Class Methods

try_convert(obj) click to toggle source
# File lib/backports/1.9.1/regexp/try_convert.rb, line 4
def Regexp.try_convert(obj)
  Backports.try_convert(obj, Regexp, :to_regexp)
end
union_with_array_argument(*arg) click to toggle source
# File lib/backports/1.8.7/regexp/union.rb, line 5
def union_with_array_argument(*arg)
  return union_without_array_argument(*arg) unless arg.size == 1
  union_without_array_argument(*arg.first)
end

Public Instance Methods

match?(*args) click to toggle source
# File lib/backports/2.4.0/regexp/match.rb, line 3
def match?(*args)
  !match(*args).nil?
end