The simple answer: () is an empty expression that evaluates to nil .
In more detail: all expressions have a result in Ruby, returning nil if there is nothing better to return. () does not cause any action on its own, so an expression that is just () returns nothing. Thus, the result of the expression is set to nil , and therefore ().nil? evaluates an empty expression, decides that nothing will be returned, returns nil . It really equals nil , so nil? says true .
Peter source share