Hi,

You actually *can* assign multiple values, if you use assignment syntax:

my_object.val = 1, 2

This will wrap 1 and 2 into an array and assign it to the single 
parameter of the val= method. Not exactly what you want, but it works 
just as well.

By the way, this is also the reason why = methods don't accept multiple 
parameters: The syntax would simply collide with Ruby's multiple 
assignment syntax.

Anyway, I think you shouldn't use = methods the way you do. They are not 
meant to be called directly and used as normal methods. Their only 
purpose is to fake the attribute syntax of classical object oriented 
languages.

-- 
Posted via http://www.ruby-forum.com/.