lib/rubocop/ast/node_pattern/lexer.rb in rubocop-ast-1.1.1 vs lib/rubocop/ast/node_pattern/lexer.rb in rubocop-ast-1.2.0
- old
+ new
@@ -50,10 +50,10 @@
end
def emit_regexp
body = ss[1]
options = ss[2]
- flag = options.each_char.map { |c| REGEXP_OPTIONS[c] }.sum
+ flag = options.each_char.sum { |c| REGEXP_OPTIONS[c] }
emit(:tREGEXP) { Regexp.new(body, flag) }
end
def do_parse