From: Lennon Day-Reynolds Date: 2004-08-28T02:03:43+09:00 Subject: Re: BUG? or inside argument list Kristof, You can use the '||' operator instead of 'or' in argumet lists: puts(nil || "string") String.new(nil || "string") On Fri, 27 Aug 2004 19:30:43 +0900, Kristof Bastiaensen wrote: > Hi, > > I get a syntax error when I try to use "or" inside a argument > list: > > #doesn't work: > puts(nil or "string") > String.new(nil or "string") > > #the following works: > puts (nil or "string") > String.new((nil or "string")) > > It appears that Ruby accepts the "or" when it parses it as an > expression, but not when it parses it as an argument list. > Isn't any expression valid inside an argument list? > > $ ruby --version > ruby 1.8.2 (2004-07-16) [i386-linux] > > Regards, > KB > > -- Lennon rcoder.net