that's cool,
but can we not redefine the default "if"
so that the following code will work

if false
  return "false is true"
end

without resorting to calling a method on a class / instance / module 
explicitly

I'm thinking that intead we can overwrite the evaluation of False and 
NilClass
?


Daniel Lucraft wrote:

> Be like Smalltalk!

> irb> (4==4).if { p :true }
> :true
> => nil
> irb> (4==6).if { p :true }
> => nil

> irb> (4==4).if :then => lambda { p :true }, :else => lambda { p :false }
> :true
> => nil
> irb> (4==6).if :then => lambda { p :true }, :else => lambda { p :false }
> :false
> => nil
> irb>

> irb> (4==6).if :then => fn { p :true }, :else => fn { p :false }
> :false
> => nil

-- 
Posted via http://www.ruby-forum.com/.