-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add BeginKeywordNode
for kwbegin
nodes
#333
Conversation
4391e76
to
4945d34
Compare
@marcandre @bquorning this isn't quite as straightforward as I originally thought. 😅 When the body of a
Rubocop seems to act as if the I also added test cases for |
BeginNode
for kwbegin
nodesBeginKeywordNode
for kwbegin
nodes
I've also gone back and forth on if this should be |
Without much thought, I'd say |
Ah yes of course, a fourth option I didn't consider 😂 I'll change it up this afternoon. |
Maybe
I think it would probably make sense to treat the |
faaf5e9
to
b613ce0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
# Returns the `rescue` node of the `ensure`, if present. | ||
# | ||
# @return [Node, nil] The `rescue` node. | ||
def rescue_node | ||
node_parts[0] if node_parts[0].rescue_type? | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcandre do you want me to do this as a separate PR, or create a separate changelog entry for it pointing to this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either work, your choice 😄
b613ce0
to
c8294f7
Compare
Updated. |
Great, thanks. Released as 1.35 |
Thanks @marcandre! |
Allows for
kwbegin
nodes to not need destructuring, as in rubocop/rubocop#13426.