From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-02-23T06:40:31+09:00 Subject: overriding operator 'or' 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: irb(main):001:0> class Foo irb(main):002:1> def initialize(value) irb(main):003:2> @value = value irb(main):004:2> end irb(main):005:1> def or(other) irb(main):006:2> @value or other irb(main):007:2> end irb(main):008:1> end nil irb(main):009:0> myfoo = Foo.new(1) # irb(main):012:0> p myfoo or 0 # 0 Phil