ruby-formatter/rufo

Expected token on_period, not on_words_sep

gangwang2 opened this issue · 4 comments

You've found a bug!
Please report it to https://github.com/ruby-formatter/rufo/issues with code that triggers it

C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:3429:in bug': Expected token on_period, not on_words_sep at [[74, 35], :on_words_sep, " ", #<Ripper::Lexer::State: EXPR_BEG>] (Rufo::Bug) from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:3424:in check'
from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:2990:in consume_token' from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:962:in consume_call_dot'
from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:942:in visit_call_with_receiver' from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:353:in visit'
from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:1257:in visit_call_with_block' from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:351:in visit'
from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:503:in block (2 levels) in visit_exps' from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:3563:in push_node'
from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:502:in block in visit_exps' from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:483:in each'
from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:483:in each_with_index' from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:483:in visit_exps'
from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:187:in visit' from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/formatter.rb:166:in format'
from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/command.rb:165:in format' from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/command.rb:48:in format_stdin'
from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/command.rb:38:in run' from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/lib/rufo/command.rb:12:in run'
from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/rufo-0.2.0/exe/rufo:4:in <top (required)>' from C:/tools/ruby25/bin/rufo:23:in load'
from C:/tools/ruby25/bin/rufo:23:in `

'

Hello @gangwang2, can you provide the source code that triggered this bug?

That way will be more easier for the team to determine the cause.

Thank you.

@gangwang2 would you also be able to try the most recent version of rufo?

@gangwang2 Was this still an issue on the most recent version of rufo?

mjago commented

Unfortunately it is not possible to reverse engineer the problem from the stack-trace. Closing until further info is forthcoming