Closed robwilliams closed 6 years ago
Hash#fetch outputs a warning if the arg count is 2 and a block is given.
It's not possible to just pass a block without this change as the key and default_or_block arguments are always passed to the parent method.
key
default_or_block
Checking if there is a block and only passing the default if there is no block stops the warning message from showing.
Thank you!! 👍
Hash#fetch outputs a warning if the arg count is 2 and a block is given.
It's not possible to just pass a block without this change as the
key
anddefault_or_block
arguments are always passed to the parent method.Checking if there is a block and only passing the default if there is no block stops the warning message from showing.