From: Michael Schuerig Date: 2005-09-11T23:06:32+09:00 Subject: When an Array is not (1) Under what circumstances is an array not an Array? I'm confronted with such a case in one of my unit tests. The test failed when run in conjunction with other tests and I narrowed it down to this: In the tested code I use something.kind_of?(Array). I have a mixin module that extends Array with additional methods. When this module is required directly or indirectly in my test class then kind_of?(Array) doesn't behave as expected anymore. (2) Maybe I'm not understanding Ruby's object system well enough. That appears to be true in another case, too. I have a mixin module for Enumerable whose methods I want to use on arrays, too, of course. But apparently it is not enough to include it in Enumerable Enumerable.module_eval do include MyEnumExt end I have to do the same for Array to make it available there Array.class_eval do include MyEnumExt end Incidentally, I get the idea that (1) and (2) are related. But still I don't understand what's happening. Michael -- Michael Schuerig Face reality and stare it down mailto:michael@schuerig.de --Jethro Tull, Silver River Turning http://www.schuerig.de/michael/