[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

syntax change for 1.9?

Roger Pack

6/17/2008 5:01:00 AM

case 3
when true && a = 3 rescue nil : false
end


this code errs in 1.9 and succeeds in 1.8.6
Was this deliberate?
[please ignore the lameness of the code--it was just a simplified
example].
Thanks!
-R
--
Posted via http://www.ruby-....

2 Answers

Nobuyoshi Nakada

6/17/2008 5:13:00 AM

0

Hi,

At Tue, 17 Jun 2008 14:00:39 +0900,
Roger Pack wrote in [ruby-talk:305381]:
> case 3
> when true && a = 3 rescue nil : false
> end

Using a colon instead of `then' wasn't an official feature.

--
Nobu Nakada

Roger Pack

6/17/2008 5:15:00 AM

0

>> when true && a = 3 rescue nil : false
>
> Using a colon instead of `then' wasn't an official feature.

Thanks!
=R
--
Posted via http://www.ruby-....