The example adding the Fixnum#odd? method is incorrect. Unlike C or JavaScript or Java, 0 in Ruby is not a logical false value. Only the Boolean literal "false" and the value "nil" are non-truth values. The example code should be:
Code:
class Fixnum
def odd?
self % 2 == 1
end
end