lib/regexp-examples/groups.rb in regexp-examples-0.5.1 vs lib/regexp-examples/groups.rb in regexp-examples-0.5.2
- old
+ new
@@ -124,23 +124,21 @@
@multiline = multiline
end
def result
chars = CharSets::Any
- chars |= ["\n"] if multiline
+ chars = (["\n"] | chars) if multiline
chars.map do |result|
GroupResult.new(result)
end
end
end
class MultiGroup
- prepend GroupWithIgnoreCase
attr_reader :group_id
- def initialize(groups, group_id, ignorecase)
+ def initialize(groups, group_id)
@groups = groups
@group_id = group_id
- @ignorecase = ignorecase
end
# Generates the result of each contained group
# and adds the filled group of each result to
# itself