From: Joel VanderWerf Date: 2002-04-19T04:23:06+09:00 Subject: calling a class method in "class << obj" context I don't understand this behavior: class A def A.foo p "FOO" end end class B < A foo # ==> "FOO" end a = A.new class << a foo # ==> undefined local variable or method `foo' for A:Class end Why doesn't the singleton class of a inherit the foo method? Why does the error message tell me that A doesn't have the foo method? I've tried: ruby 1.6.5 (2001-09-19) [i586-linux] ruby 1.6.7 (2002-03-01) [i586-linux]