Re: Confusion Over Keyword Arguments

to
Here’s the latest test case we had for Sydney. Note that Sydney
http://redhanded.hobix.com/inspect/namedParametersArenTTheyAllNamed.ht

You can use named parameters, using the name of the parameter

Your testcases do not seem to cover the scope completely and
assert_nothing_raised{ @foo.bar(z:1, x:2, y:3) }
end # test_corner_cases

To cover those.

Yes, I think this is one of the reasons we started leaning towards using
‘=’ instead. Maybe we should stick with ‘=>’ - no issues with symbols
or assignment, and people are used to it.

Regards,

Dan

Berger, Daniel wrote:

to
Here’s the latest test case we had for Sydney. Note that Sydney
http://redhanded.hobix.com/inspect/namedParametersArenTTheyAllNamed.ht

You can use named parameters, using the name of the parameter

Your testcases do not seem to cover the scope completely and
assert_nothing_raised{ @foo.bar(z:1, x:2, y:3) }
end # test_corner_cases

To cover those.

Yes, I think this is one of the reasons we started leaning towards using
‘=’ instead. Maybe we should stick with ‘=>’ - no issues with symbols
or assignment, and people are used to it.

Both problems should be fixed by mandating that there
be a space between foo: and its argument :slight_smile: What other
parsing issues that might bring is different.

Regards,

Dan

E