Class: Regexp

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/rubyfixes/regexp_union_takes_array.rb

Class Method Summary collapse

Class Method Details

.orig_regexp_unionObject



17
# File 'lib/logstash/rubyfixes/regexp_union_takes_array.rb', line 17

alias_method :orig_regexp_union, :union

.union(*args) ⇒ Object



19
20
21
22
23
24
# File 'lib/logstash/rubyfixes/regexp_union_takes_array.rb', line 19

def union(*args)
  if args[0].is_a?(Array) && args.size == 1
    return orig_regexp_union(*args[0])
  end
  return orig_regexp_union(*args)
end