|
|
|
|
|
by jaynetics
536 days ago
|
|
_1 is also a bit of a footgun. It becomes an array of all block params IF the block has an arity > 1 AND no other block param (e.g. _2) is referenced anywhere within the block. It's an unusually half-baked feature by Ruby's standards. I think there was some hesitation about the name "it" initially, because "it" is an essential method name in rspec, and is used within blocks there. |
|
I'd like know if `it` is merely an alias for `_1`, or if protects from this "arity issue" too.