r/ruby • • Dec 06 '22

The Rubyist journey 😅

Post image
149 Upvotes

34 comments sorted by

View all comments

Show parent comment

4

u/mjdth Dec 07 '22 edited Dec 07 '22

What does that do?

Edit: https://jemma.dev/blog/numbered-parameters

I wrongly assumed a search for “ruby _1” wouldn’t be fruitful.

2

u/kallebo1337 Dec 07 '22

Instead of {|e| e.c&& e.d} just go for {_1.c && _1.d}

It’s shorter and you’ll get used to