-
-
Notifications
You must be signed in to change notification settings - Fork 58
Break and return false in forced_brace_bounds? when Parent is a Binary #143
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
Break and return false in forced_brace_bounds? when Parent is a Binary #143
Conversation
Thank you for this gem, I am enjoying it with the Neovim integration so far. While going through the issue #122, it seems like the Binary node check should be added to While adding a few tests, there is this test case that caught my attention: Actual Behavior
foo =
barrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr if foooooooooooooooooooooo ||
barrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.any? do |bar|
bazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
end What I expected
foo =
barrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr if foooooooooooooooooooooo ||
barrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.any? do |bar|
bazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
end Or should it beif foooooooooooooooooooooo ||
barrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.any? do |bar|
bazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
end
foo = barrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
end |
Thank you so much for the pull request! This is very detailed in the tests, which I appreciate. I think it should be if foooooooooooooooooooooo ||
barrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.any? do |bar|
bazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
end
foo = barrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
end at this point the modifier form of the |
@weizheheng would you mind rebasing off |
@kddnewton Hi, yes of course, I'm on vacation now but will be back in three days. Will do it once I'm back. |
3277d11
to
1372609
Compare
@kddnewton Done rebasing. This PR is purely fixing #122. Will probably look into the below in a different PR.
|
Thank you! |
@weizheheng looks like this failed CI on an idempotency check. You can check it locally with |
13d1ec1
to
2196011
Compare
2196011
to
78eea51
Compare
Fixes #122
Signed-off-by: Wei Zhe Heng [email protected]