3 ms·
It's because Ruby thinks {} is a block. All Ruby methods can implicitly take a block (why? who knows...), so the single-line block syntax is parsed as such befo
by tomphoolery 11y ago
It's because Ruby thinks {} is a block. All Ruby methods can implicitly take a block (why? who knows...), so the single-line block syntax is parsed as such before it can be considered a hash argument into the method.