4 ms·
def foo(bar, baz: "something") is perfectly valid ruby(1.9).
by Argorak 15y ago
def foo(bar, baz: "something") is perfectly valid ruby(1.9).
- chc 15y agoReally? What on earth does it mean? The "baz: something" ought to parse as a hash literal, which isn't legal in a method declaration.
- Argorak 15y agoSorry, I really should get some sleep: i read "foo(a: b)", but wrote what you wrote and complained about it. :) You are right :).
- Argorak 15y agoNow I know where I got that from: its the proposed keyword argument syntax for ruby 2.0. http://ruby-dev.info/posts/44602 http://ruby-dev.info/posts/44602