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

crashes when formatting in statement pattern matching #312

Closed
ShreyanJain9 opened this issue Oct 19, 2023 · 2 comments · Fixed by #313
Closed

crashes when formatting in statement pattern matching #312

ShreyanJain9 opened this issue Oct 19, 2023 · 2 comments · Fixed by #313

Comments

@ShreyanJain9
Copy link

The code that triggered it:

      def to_proc
        ->session {
          session.xrpc.post.send(self.endpoint_name, **self.to_individual_hash(session)).then do |response|
            case response
            in Integer
              response
            in {"uri": uri, "cid": cid} if Hash === response
              ATProto::Record::StrongRef.new(
                uri: AtUri(uri),
                cid: Skyfall::CID.from_json(cid),
              )
            else
              raise ATProto::Error, "Something went wrong: #{response}"
            end
          end
        }
      end

The error:

You've found a bug!
It happened while trying to format the file ./lib/at_protocol/writes.rb
Please report it to https://github.com/ruby-formatter/rufo/issues with code that triggers it
/Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3915:in `bug': Expected token on_ident, not on_tstring_beg at [[85, 16], :on_tstring_beg, "\"", BEG|LABEL] (Rufo::Bug)
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3910:in `check'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3467:in `consume_token'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:291:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:298:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3316:in `block in visit_hash_pattern'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:2809:in `block in visit_literal_elements'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:2800:in `each'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:2800:in `each_with_index'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:2800:in `visit_literal_elements'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3311:in `visit_hash_pattern'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:485:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:993:in `visit_suffix'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:337:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3029:in `block in visit_when'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3720:in `indent'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3018:in `visit_when'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:388:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3127:in `visit_when'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:388:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:2993:in `visit_case'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:386:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:520:in `block (2 levels) in visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:4036:in `push_node'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:519:in `block in visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `each'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `each_with_index'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3800:in `block in indent_body'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3724:in `indent'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3799:in `indent_body'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:1594:in `visit_bodystmt'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:1423:in `visit_do_block'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:370:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:1354:in `visit_call_with_block'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:364:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:520:in `block (2 levels) in visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:4036:in `push_node'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:519:in `block in visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `each'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `each_with_index'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3800:in `block in indent_body'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3724:in `indent'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3799:in `indent_body'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:2684:in `visit_lambda'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:448:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:520:in `block (2 levels) in visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:4036:in `push_node'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:519:in `block in visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `each'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `each_with_index'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3800:in `block in indent_body'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3724:in `indent'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3799:in `indent_body'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:1594:in `visit_bodystmt'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:376:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:2122:in `visit_def_from_name'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:2035:in `block in visit_def'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:4044:in `push_hash'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:2034:in `visit_def'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:406:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:520:in `block (2 levels) in visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:4036:in `push_node'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:519:in `block in visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `each'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `each_with_index'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3800:in `block in indent_body'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3724:in `indent'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3799:in `indent_body'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:1594:in `visit_bodystmt'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:376:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:1990:in `block in visit_class'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:4051:in `push_type'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:1974:in `visit_class'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:394:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:520:in `block (2 levels) in visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:4036:in `push_node'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:519:in `block in visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `each'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `each_with_index'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3800:in `block in indent_body'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3724:in `indent'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3799:in `indent_body'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:1594:in `visit_bodystmt'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:376:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:1990:in `block in visit_class'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:4051:in `push_type'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:1974:in `visit_class'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:394:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:520:in `block (2 levels) in visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:4036:in `push_node'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:519:in `block in visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `each'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `each_with_index'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3800:in `block in indent_body'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3724:in `indent'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:3799:in `indent_body'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:1594:in `visit_bodystmt'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:376:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:2007:in `block in visit_module'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:4051:in `push_type'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:2000:in `visit_module'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:396:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:520:in `block (2 levels) in visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:4036:in `push_node'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:519:in `block in visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `each'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `each_with_index'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:498:in `visit_exps'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:201:in `visit'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/formatter.rb:177:in `format'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/command.rb:146:in `format'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/command.rb:107:in `format_file'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/command.rb:85:in `block in format_args'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/command.rb:78:in `each'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/command.rb:78:in `format_args'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/command.rb:40:in `run'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/lib/rufo/command.rb:12:in `run'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rufo-0.16.2/exe/rufo:4:in `<top (required)>'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/bin/rufo:25:in `load'
        from /Users/shreyanjain/.rbenv/versions/3.2.2/bin/rufo:25:in `<main>'
@kzkn
Copy link
Member

kzkn commented Oct 28, 2023

@ShreyanJain9
Thanks for the report.
Current rufo supports hash literal patterns which has unquoted key like { uri: uri }, no support quoted key like { "uri": uri }. The syntax should be supported.

kzkn added a commit that referenced this issue Oct 29, 2023
@kzkn kzkn mentioned this issue Oct 29, 2023
@kzkn kzkn closed this as completed in #313 Nov 8, 2023
kzkn added a commit that referenced this issue Nov 8, 2023
@kzkn
Copy link
Member

kzkn commented Nov 8, 2023

@ShreyanJain9
I have released the fix as 0.16.3. Thanks!

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.

2 participants