there is special syntax for 'if'. it could be expressed instead as a method that takes a value and a block then optionally executes the block.
if a > 0
defining an 'if' method works fine but it turns out to be more intuitive to call the method 'true?'.
a similar method, 'false?', could be defined to replace 'unless'. i think this has potential. someone on #ruby-lang wrote the 'if' method, i renamed it to 'true?'.
class FalseClass def true? end end
class NilClass def true? end end /typo:code
what is missing is else. a method would have to support receiving two blocks for else to be easily implemented.