lib/rubocop/ast/node_pattern/lexer.rb in rubocop-ast-0.7.0 vs lib/rubocop/ast/node_pattern/lexer.rb in rubocop-ast-0.7.1

- old
+ new

@@ -36,11 +36,11 @@ private # @return [token] def emit(type) - value = ss.captures.first || ss.matched + value = ss[1] || ss.matched value = yield value if block_given? token = token(type, value) @tokens << token token end @@ -48,10 +48,11 @@ def emit_comment nil end def emit_regexp - body, options = ss.captures + body = ss[1] + options = ss[2] flag = options.each_char.map { |c| REGEXP_OPTIONS[c] }.sum emit(:tREGEXP) { Regexp.new(body, flag) } end