Issue #13536 has been reported by shyouhei (Shyouhei Urabe).

----------------------------------------
Bug #13536: Ripper fails to tokenize nested squiggly heredoc
https://bugs.ruby-lang.org/issues/13536

* Author: shyouhei (Shyouhei Urabe)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0dev (2017-05-02 trunk 58544) [x86_64-darwin15]
* Backport: 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED
----------------------------------------
```ruby
require 'ripper'

str = \
<<~'end'
<<~"do"
#{
<<~"begin"
this must be a valid ruby
begin
}
do
end
puts eval(str)
str == Ripper.tokenize(str)
```

This program fails at the last line.



-- 
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>