3 ms·
I've always worked with the convention that {} is for single line blocks and do ... end for multi-line
by rahoulb 6y ago
I've always worked with the convention that {} is for single line blocks and do ... end for multi-line
- Lio 6y agoI've also heard people discuss a convention where do end is used for side affecting code and {} is used for pure blocks.... but I've never seen anyone really stick to it so single-line vs multi-line is as good as anything.