From: Robert Feldt Date: 2001-11-03T03:35:17+09:00 Subject: [ruby-talk:24190] Re: Limits of dynamism? On Sat, 3 Nov 2001, Ryan Leavengood wrote: > class Module > alias_method :__old_case_eq__, :=== > def ===(other) > if other.kind_of? self > return true > else > __old_case_eq__(other) > end > end > end > > Do this and it works. Otherwise Ruby uses its C API to determine the > class of an object, which will return T for T. But by explicitly > calling kind_of? we can delegate to the internal class and it works > correctly. > My point was to ask the community and matz why this isn't the default behavior. /Robert