We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've got a test case here: lparry@9c4e59c
the following causes rufo to explode:
{ 1 => {} }
output:
Failures: 1) Rufo::Formatter formatter_source_specs/hash_literal.rb.spec formats unnamed test (line: 138) Failure/Error: case node.first NoMethodError: undefined method `first' for nil:NilClass # ./lib/rufo/formatter.rb:3840:in `node_line' # ./lib/rufo/formatter.rb:3842:in `node_line' # ./lib/rufo/formatter.rb:3851:in `node_line' # ./lib/rufo/formatter.rb:3855:in `node_line' # ./lib/rufo/formatter.rb:3842:in `node_line' # ./lib/rufo/formatter.rb:3832:in `need_space_for_hash?' # ./lib/rufo/formatter.rb:2305:in `visit_hash' # ./lib/rufo/formatter.rb:420:in `visit' # ./lib/rufo/formatter.rb:522:in `block (2 levels) in visit_exps' # ./lib/rufo/formatter.rb:3658:in `push_node' # ./lib/rufo/formatter.rb:521:in `block in visit_exps' # ./lib/rufo/formatter.rb:502:in `each' # ./lib/rufo/formatter.rb:502:in `each_with_index' # ./lib/rufo/formatter.rb:502:in `visit_exps' # ./lib/rufo/formatter.rb:198:in `visit' # ./lib/rufo/formatter.rb:176:in `format' # ./lib/rufo/formatter.rb:14:in `format' # ./spec/lib/rufo/formatter_spec.rb:43:in `block (3 levels) in assert_source_specs'
The text was updated successfully, but these errors were encountered:
Fix crash on nested empty hash literal
58c2402
Fixes ruby-formatter#152
Merge pull request #153 from lparry/lparry/nested-empty-hash-bug
79faf7c
Fix Nested empty hash bug #152
No branches or pull requests
I've got a test case here: lparry@9c4e59c
the following causes rufo to explode:
output:
The text was updated successfully, but these errors were encountered: