Charles Mills
10/20/2004 4:42:00 PM
After reading the "Too many default argument values!" thread I was
wondering why the following isn't possible:
##
def do_something(arg1, opt1, arg2, opt2)
# ...
end
my_meth("hey", :yada => "blue", :foo => "bar", "my_spreadsheet.xls", :wkst => "sheet1", :range =>
"A1:C5")
## END
Just wondering why the above call causes a syntax error instead of
having the same behavior as:
my_meth("hey", {:yada => "blue", :foo => "bar"}, "my_spreadsheet.xls",
{:wkst => "sheet1", :range => "A1:C5"})
Probably too ambiguous to parse effectively. (I get the feeling this
has already been asked on ruby talk.)
-Charlie