Bug #19399
Updated by nobu (Nobuyoshi Nakada) almost 2 years ago
`Ripper::Lexer.parse` Ripper::Lexer.paser throws ``undefined method `flatten!' for nil:NilClass (NoMethodError)`` for this input ~~~ruby require 'ripper' code = <<~CODE a do |b # closing "|" is missing <<~C C end CODE Ripper::Lexer.parse code ~~~ ~~~ /Users/tomoya/.rbenv/versions/3.2.0/lib/ruby/3.2.0/ripper/lexer.rb:183:in `parse': undefined method `flatten!' for nil:NilClass (NoMethodError) result.concat(@buf) until (@buf = []; super(); @buf.flatten!; @buf.empty?) ^^^^^^^^^ from /Users/tomoya/.rbenv/versions/3.2.0/lib/ruby/3.2.0/ripper/core.rb:19:in `parse' from -:8:in `<main>' ~~~