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

method parameters ending with comma crash rubocop #54

Closed
aaronjensen opened this issue Apr 13, 2013 · 1 comment
Closed

method parameters ending with comma crash rubocop #54

aaronjensen opened this issue Apr 13, 2013 · 1 comment

Comments

@aaronjensen
Copy link

Something like: foo(3,4,) or foo(a: 3, b: 4,) crashes.

gems/rubocop-0.4.2/lib/rubocop/cop/align_parameters.rb:46:in `get_args':  (RuntimeError)
app/helpers/categories_helper.rb: [:method_add_arg, [:fcall, [:@ident, "link_to", #<struct Rubocop::Cop::Position lineno=23, column=4>]], [:arg_paren, [[:method_add_arg, [:fcall, [:@ident, "t", #<struct Rubocop::Cop::Position lineno=24, column=6>]], [:arg_paren, [:args_add_block, [[:string_literal, [:string_content, [:@tstring_content, "shared.categories.reset-link", #<struct Rubocop::Cop::Position lineno=24, column=9>]]], [:bare_assoc_hash, [[:assoc_new, [:@label, "default:", #<struct Rubocop::Cop::Position lineno=24, column=40>], [:string_literal, [:string_content, [:@tstring_content, "Reset Filters", #<struct Rubocop::Cop::Position lineno=24, column=50>]]]]]]], false]]], [:vcall, [:@ident, "collection_path", #<struct Rubocop::Cop::Position lineno=25, column=6>]], [:bare_assoc_hash, [[:assoc_new, [:@label, "class:", #<struct Rubocop::Cop::Position lineno=26, column=6>], [:string_literal, [:string_content, [:@tstring_content, "reset disabled", #<struct Rubocop::Cop::Position lineno=26, column=14>]]]], [:assoc_new, [:@label, "title:", #<struct Rubocop::Cop::Position lineno=27, column=6>], [:method_add_arg, [:fcall, [:@ident, "t", #<struct Rubocop::Cop::Position lineno=27, column=13>]], [:arg_paren, [:args_add_block, [[:string_literal, [:string_content, [:@tstring_content, "tooltips.filtering.reset", #<struct Rubocop::Cop::Position lineno=27, column=16>]]], [:bare_assoc_hash, [[:assoc_new, [:@label, "default:", #<struct Rubocop::Cop::Position lineno=27, column=43>], [:string_literal, [:string_content, [:@tstring_content, "Return filters to the default view", #<struct Rubocop::Cop::Position lineno=27, column=53>]]]]]]], false]]]]]]]]]
        from gems/rubocop-0.4.2/lib/rubocop/cop/align_parameters.rb:16:in `block in inspect'
@bbatsov
Copy link
Collaborator

bbatsov commented Apr 14, 2013

Fixed in RuboCop 0.4.3 which was just released.

@bbatsov bbatsov closed this as completed Apr 14, 2013
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

No branches or pull requests

2 participants