2 ms·
It isn't a big win compared to just calling the method with it: meth(foo: 1, bar: 2) # even if multiline meth( foo: 1, bar: 2 )
by chucke 2y ago
It isn't a big win compared to just calling the method with it:
meth(foo: 1, bar: 2)
# even if multiline
meth(
foo: 1,
bar: 2
)
while needlessly allocating an hash (kwargs optimize that).
- quesera 2y agoFor this small example, I certainly agree. But I like to use a prepared hash when there's preparation that must be done, or if it just makes the data more clear.