From: Eric Hodel Date: 2005-08-22T16:53:38+09:00 Subject: Re: Non-overridable and non-redefinable methods On 21 Aug 2005, at 11:20, Florian Frank wrote: > Eric Hodel wrote: > >> ObjectSpace.each_object (that doesn't include Enumerable, which >> can be truly annoying when you want to exploit it). > > Really? I don't see Enumerable here: $ ruby -e 'p ObjectSpace.ancestors' [ObjectSpace] > ObjectSpace.enum_for(:each_object) Doesn't work as presented: $ ruby -e 'ObjectSpace.enum_for :each_object' -e:1: undefined method `enum_for' for ObjectSpace:Module (NoMethodError) Remembering that enum_for is the thing you want and which library to get it from is the annoyance factor. This usually is enough to discourage people. -- Eric Hodel - drbrain@segment7.net - http://segment7.net FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04