What I am really looking for is the concept of lvalue's.  There are many 
other situations where they come in handy.  Another contrived example 
might be:

a = \array[123]['abc']['def']
if (some_condition)
  return a
a = some_value

then you don't compute the index for array twice.

Anything like that?  (I have not been able to find it...)

P.S.  The \ is how you would do it in perl.

Chris Carter wrote:
> On 3/1/07, Dick <rwk / americom.com> wrote:
>>     @@dcounts[difficulty][artistid]
>> test.rb:14: parse error, unexpected '=', expecting $
>> Song.count(1,3547) = 10
>>                     ^
>>
>> --
>> Posted via http://www.ruby-forum.com/.
>>
>>
> 
> You could do something like:
> def Song.count=(*args)
>     @@dcounts[args[0]] ||= {}
>     @@dcounts[args[0]][args[1]] = args[2]
> end
> 
> Song.count 1, 3547, 10


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