в 2011ǯ0714 17:38, Iaki Baz Castillo ƻ:
> If you use a "case" expression because
> >  it should yield a value (i.e. "x = case...end") then I would only use
> >  exceptions as other way out.  A "return" indicates regular execution
> >  flow which in the case of this usage of "case" would mean "have case
> >  return a value" but not "return from the method".

Remember all the block in ruby is actually a snippet ,so return from the 
block will return from the method which call the block.
For example,type the following code in irb

value =case 123
   when Fixnum
     return "good"
   end
LocalJumpError: unexpected return

The real reason for your question is that, everything in ruby has a 
value, include statements. When return statements works, it yield a 
value which is the result of the invocation, the assignment doesn't happen.

value=2
def test2
   value=case 123
     when Fixnum
       return 3
     end
end

test2
p  value
#output
2