Issue #12232 has been reported by Pavel Pravosud.

----------------------------------------
Bug #12232: Ripper.lex can't parse 2.3-style heredoc
https://bugs.ruby-lang.org/issues/12232

* Author: Pavel Pravosud
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: 2.3.0p0
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
~~~ruby
require "ripper"

Ripper.lex("<<~HEREDOC\nHEREDOC")
# => NoMethodError: undefined method `event' for #<Array:0x007fc25c07d598>
#        from /Users/rwz/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/ripper/lexer.rb:70:in `block in on_heredoc_dedent'
#        from /Users/rwz/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/ripper/lexer.rb:69:in `each'
#        from /Users/rwz/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/ripper/lexer.rb:69:in `on_heredoc_dedent'
#        from /Users/rwz/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/ripper/lexer.rb:61:in `parse'
#        from /Users/rwz/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/ripper/lexer.rb:61:in `parse'
#        from /Users/rwz/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/ripper/lexer.rb:55:in `lex'
#        from /Users/rwz/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/ripper/lexer.rb:44:in `lex'
~~~



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>