3 ms·
It is, and it's how I do it when I write Ruby. I was just responding to "it doesn't matter" part of the parent comment. If you decide not to use parens, then
by sodapopcan 3y ago
It is, and it's how I do it when I write Ruby. I was just responding to "it doesn't matter" part of the parent comment. If you decide not to use parens, then you get situations like the one I illustrated where you have to use parens for chaining then you're left with a decision about what to do with the last one.
- andrewmutz 3y agoWhy are the parens important in this example?
- sodapopcan 3y agoYou can't chain without parens. # Does not work "foo bar" .split " " .join " " There was a proposal to introduce a "pipe" operator at one point which was shot down [0]. It wasn't actually a pipe operator at all and really just an operator that would have made the previous syntax possible (|>, instead of .) [0] https://dev.to/baweaver/ruby-2-7-the-pipeline-operator-1b2d https://dev.to/baweaver/ruby-2-7-the-pipeline-operator-1b2d