From: Brian Candler Date: 2010-09-17T22:19:32+09:00 Subject: Re: Use of ? in variable names Silas Davis wrote: > I assume currently the syntax: > > bool ? : > > Can be written: > > bool? : You assume wrongly. >> a = 1 => 1 >> a? "foo" : "bar" SyntaxError: compile error (irb):2: syntax error, unexpected ':', expecting $end a? "foo" : "bar" ^ from (irb):2 from :0 >> a ? "foo" : "bar" => "foo" >> RUBY_DESCRIPTION => "ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]" -- Posted via http://www.ruby-forum.com/.