From: Albert Schlef Date: 2010-01-01T16:30:19+09:00 Subject: Re: Why can't I use "or" here? Phillip Gawlowski wrote: > begin > raise ArgumentError unless ARGV[0] > puts ARGV[0] > rescue ArgumentError > puts "we had an argument error" > end > > Basically, the begin/rescue/end tokens (bits that Ruby understands > [...] Thanks Phillip (and Charles Nutter) for all your help. In my 'raise' I tried to mimic Perl's "or die" idiom. But I see that your example is more elegant. > > If "123 or true" isn't a statement, then it's a simple expression. And > > then I would be able to do: > > Take a third option: It's an evaluation. ;) For the time being I'll take the fourth option: The Ruby grammar is weird in some corners, and we just have to accept it. -- Posted via http://www.ruby-forum.com/.