Class: Regexp

Inherits:
Object show all
Defined in:
lib/vendor/backports-3.3.5/lib/backports/1.8.7/regexp/union.rb

Class Method Summary collapse

Class Method Details

.try_convert(obj) ⇒ Object



4
5
6
# File 'lib/vendor/backports-3.3.5/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) ⇒ Object



5
6
7
8
# File 'lib/vendor/backports-3.3.5/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