Fix IfNode#branches to return both branches when called on ternary conditional#146
Conversation
|
Good catch, thanks. Expect a release later today. |
| let(:source) { 'foo? ? :foo : 42' } | ||
|
|
||
| it { expect(if_node.branches.size).to eq(2) } | ||
| it { expect(if_node.branches).to all(be_literal) } |
There was a problem hiding this comment.
FYI, I think you can do both in a single expectaction to match [be_literal, be_literal]
There was a problem hiding this comment.
I just stick to the existing codestyle and replicated the nearest similar example 😄
|
Oh, didn't notice, but the Changelog entry was misplaced. Best use |
|
Released 1.1.1, thanks! |
|
I do not understand, how I did not noticed that it is not under master? It is the second time, at least, that I remember. 💦 |
You're probably too used to |
Currently, it is returning only 1 branch.