[#1094] Re: [ruby-cvs] ruby, ruby/lib: * eval.c (ev_const_defined, ev_const_get), variable.c — Dave Thomas <dave@...>

> * eval.c (rb_mod_autoload, rb_mod_autoload_p): new method;

12 messages 2003/05/29
[#1095] Re: [ruby-cvs] ruby, ruby/lib: * eval.c (ev_const_defined, ev_const_get), variable.c — nobu.nokada@... 2003/05/29

Hi,

Re: irb doesn't work, because tempfile doesn't work

From: Jim Freeze <jim@...>
Date: 2003-05-03 00:45:57 UTC
List: ruby-core #1009
On Saturday,  3 May 2003 at  1:48:13 +0900, Dave Thomas wrote:
> Yukihiro Matsumoto wrote:
> > |Is this because of the 'instance_methods' change?
> > 
> > Yes.  I thought they should be consistent with Object#methods.
> 
> instance_methods.include?("power!"), which seemed ugly.
> 
> So, if we're making things incompatible, I'd like to suggest a more 
> global change. Make _all_ the reflection methods accept a 'recurse' 
> parameter (including things such as method_defined?), and have that 
> parameter default to the current 1.6.x behavior. As it stands right now 
> we have a curious mixture: some allow you recurse, some let you specify 
> it, and some don't recurse.

So, instead of recurse, why not depth.
The default could be no recurse, or zero depth.
A depth=1 could be search the current class only.
A depth=2 could be equivalent to 1 recursive level down.
A depth=-1 could be infinite depth.


-- 
Jim Freeze
----------
"By the time they had diminished from 50 to 8, the other dwarves began
to suspect 'Hungry' ..."
		-- Gary Larson, "The Far Side"

In This Thread