-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: unexpected token kDO #466
Comments
Released 2.5.0.3 that has this fixed. |
It seems nothing changed. % ruby-parse -v
ruby-parse based on parser version 2.5.0.3
% ruby-parse test.rb
test.rb:1:21: error: unexpected token kDO
test.rb:1: foo "#{(1+1).to_i}" do
test.rb:1: ^~ |
Works for me:
|
$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
$ bin/ruby-parse test.rb
(block
(send nil :foo
(dstr
(begin
(send
(begin
(send
(int 1) :+
(int 1))) :to_i))))
(args) nil) $ ruby -v
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
$ bin/ruby-parse test.rb
test.rb:1:21: error: unexpected token kDO
test.rb:1: foo "#{(1+1).to_i}" do
test.rb:1: ^~ |
Hi, this issue is still occuring with Ruby Thank you! |
I can confirm it, |
Is there a way around it for now? I ask as it's blocking a pull request. It's not urgent, I'm simply curious. Thank you for confirming it so quickly. |
Yes,
Basically avoid constructions like So the workaround is to change the code to |
I'll cut a release soon. |
2.5.1.0 |
I found similar issue at rubocop/rubocop#5573, and I think this is bug of parser instead of rubocop.
The text was updated successfully, but these errors were encountered: