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

Fix check_symbol_to_proc false positives on lambda literals #68

Merged

Conversation

kiyot
Copy link
Contributor

@kiyot kiyot commented Oct 1, 2019

Currently lambda literal like ->(x) { x.to_s } violates the check_symbol_to_proc rule.

This rule makes sense when it is applied to method calls with blocks, but I'm not sure if the violation on lambda literal is an intentional behavior.

It feels awkward to me if I have to write f = :to_s.to_proc instead of f = ->(x) { x.to_s }.

@DamirSvrtan
Copy link
Owner

Hey @kiyot, thanks for another great contribution! Please give me a bit of time to review this and understand it a bit more!

@DamirSvrtan
Copy link
Owner

Reviewed it and it makes sense to me, thanks for the contribution @kiyot!

@DamirSvrtan DamirSvrtan merged commit 4f7f18e into DamirSvrtan:master Oct 5, 2019
@DamirSvrtan
Copy link
Owner

Now i just saw that our integration with Travis CI has not worked for some time - for me i'm getting failing specs on Ruby 2.6.1 - which version of Ruby are you running?

@kiyot
Copy link
Contributor Author

kiyot commented Oct 5, 2019

I was using ruby 2.6.4, and one of the specs was failing.

@DamirSvrtan
Copy link
Owner

Alright, since they've been failing, i've reverted them. Do you mind opening another PR with specs passing?

@kiyot
Copy link
Contributor Author

kiyot commented Oct 6, 2019

The spec had been failing even before my two PRs were merged.

@kiyot
Copy link
Contributor Author

kiyot commented Oct 6, 2019

It looks like the failure is caused by the newest version of ruby_parser (3.14.0). When I use ruby_parser 3.13.0, all the specs pass.

@DamirSvrtan
Copy link
Owner

Thanks for clarifying, i've pinged the ruby_parser maintainers to let us know the supported versions of Ruby: seattlerb/ruby_parser#298.

Let's pickup this conversation after we resolve that!

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 this pull request may close these issues.

2 participants