From: matz@... (Yukihiro Matsumoto) Date: 2002-02-23T11:01:45+09:00 Subject: Re: overriding operator 'or' Hi, In message "overriding operator 'or'" on 02/02/23, Phil Tomson writes: |According to "Ruby in a Nutshell" pg 18, 'or' is a nonmethod operator |which cannot be overridden. However, it seems that I CAN override the |'or' operator: You've defined "or" method, but no "or" operator. class Foo def initialize(value) @value = value end def or(other) p "or" @value or other end end myfoo = Foo.new(1) p myfoo or 0 # builtin "or" operator p myfoo.or(0) # your "or" method It is confusing, but I won't stop you shooting your foot. matz.