From: matz@... (Yukihiro Matsumoto) Date: 2002-07-10T18:56:54+09:00 Subject: Re: Case expressions and LHS of assignment.... Hi, In message "Case expressions and LHS of assignment...." on 02/07/10, Hugh Sasse Staff Elec Eng writes: |While trying to avoid Repetition in my code I tried to rewrite a case |statement, thinking how they can be used on the right hand side of an |assignment, so I tried the left hand side. It basically came down to |this: Unlike Perl (nor C++), the evaluated result of case statement is the "value", not the "reference". And I feel this is a good thing. Why not def assign(x,y) case x when 1 @a = y when 2 @b = y when 3 @c = y end end matz.