[ruby-core:81879] [Ruby trunk Bug#13536] Ripper fails to tokenize nested squiggly heredoc

From: nagachika00@...
Date: 2017-07-01 11:51:18 UTC
List: ruby-core #81879
Issue #13536 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.2: REQUIRED, 2.3: DONE, 2.4: REQUIRED to 2.2: REQUIRED, 2.3: DONE, 2.4: DONE

ruby_2_4 r59247 merged revision(s) 58545,58584.

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

* Author: shyouhei (Shyouhei Urabe)
* Status: Closed
* 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: DONE, 2.4: DONE
----------------------------------------
```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>

In This Thread

Prev Next