From: Phillip Gawlowski Date: 2009-12-31T20:06:27+09:00 Subject: Re: Why can't I use "or" here? On 31.12.2009 11:38, Albert Schlef wrote: > What do you mean? Something like this: PS C:\Scripts> ruby .\unless.rb we had an argument error PS C:\Scripts> ruby .\unless.rb arg arg PS C:\Scripts> cat .\unless.rb 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 without being told about by you) allow the programmer to recover from an error in a graceful way. If you had a file open, for example, you can make sure it is closed properly if a so-called exception (Like ArgumentError in the example) appears. -- Phillip Gawlowski