Skip to content
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

Partial argument forwarding crushes rufo. #268

Closed
sevenc-nanashi opened this issue Aug 24, 2021 · 0 comments · Fixed by #270
Closed

Partial argument forwarding crushes rufo. #268

sevenc-nanashi opened this issue Aug 24, 2021 · 0 comments · Fixed by #270

Comments

@sevenc-nanashi
Copy link
Collaborator

        def method_missing(method, ...)
          @new_value.__send__(method, ...)
        end
You've found a bug!
It happened while trying to format the file ./lib/discorb/audit_logs.rb
Please report it to https://github.com/ruby-formatter/rufo/issues with code that triggers it
C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3578:in `bug': Expected token on_op, not on_comma at [[281, 33], :on_comma, ",", BEG|LABEL] (Rufo::Bug)
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3573:in `check'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3158:in `consume_op'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:2142:in `visit_params'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:416:in `visit'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:2058:in `block in visit_def_from_name'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3383:in `indent'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:2057:in `visit_def_from_name'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:2001:in `block in visit_def'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3703:in `push_hash'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:2000:in `visit_def'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:410:in `visit'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:526:in `block (2 levels) in visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3695:in `push_node'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:525:in `block in visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `each'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `each_with_index'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3463:in `block in indent_body'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3387:in `indent'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3462:in `indent_body'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:1574:in `visit_bodystmt'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:380:in `visit'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:1969:in `block in visit_class'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3710:in `push_type'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:1953:in `visit_class'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:398:in `visit'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:526:in `block (2 levels) in visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3695:in `push_node'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:525:in `block in visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `each'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `each_with_index'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3463:in `block in indent_body'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3387:in `indent'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3462:in `indent_body'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:1574:in `visit_bodystmt'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:380:in `visit'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:1969:in `block in visit_class'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3710:in `push_type'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:1953:in `visit_class'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:398:in `visit'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:526:in `block (2 levels) in visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3695:in `push_node'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:525:in `block in visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `each'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `each_with_index'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3463:in `block in indent_body'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3387:in `indent'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3462:in `indent_body'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:1574:in `visit_bodystmt'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:380:in `visit'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:1969:in `block in visit_class'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3710:in `push_type'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:1953:in `visit_class'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:398:in `visit'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:526:in `block (2 levels) in visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3695:in `push_node'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:525:in `block in visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `each'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `each_with_index'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3463:in `block in indent_body'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3387:in `indent'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3462:in `indent_body'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:1574:in `visit_bodystmt'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:380:in `visit'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:1986:in `block in visit_module'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3710:in `push_type'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:1979:in `visit_module'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:400:in `visit'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:526:in `block (2 levels) in visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:3695:in `push_node'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:525:in `block in visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `each'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `each_with_index'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:504:in `visit_exps'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:201:in `visit'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/formatter.rb:177:in `format'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/command.rb:146:in `format'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/command.rb:107:in `format_file'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/command.rb:85:in `block in format_args'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/command.rb:78:in `each'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/command.rb:78:in `format_args'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/command.rb:40:in `run'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/lib/rufo/command.rb:12:in `run'
        from C:/develop/Ruby30/lib/ruby/gems/3.0.0/gems/rufo-0.12.0/exe/rufo:4:in `<top (required)>'
        from C:/develop/Ruby30/bin/rufo:23:in `load'
        from C:/develop/Ruby30/bin/rufo:23:in `<main>'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant