> At Mon, 20 May 2002 03:13:04 +0900,
> wconrad / yagni.com wrote:
> > There is an experimental patch at
> > http://yagni.com/stack_frames/index.php that lets you find out the
> > caller's class.  It's against Ruby 1.6.5; let me know if it won't
> > apply to whatever later version of Ruby you're using and I'll fix it
> > up.

Nobu, Hi!  Thanks for looking at the patch.

On Mon, May 20, 2002 at 08:27:17PM +0900, nobu.nokada / softhome.net wrote:
> Interesting.  It's too hard to get an arbitrary binding, this
> is possible.

I don't think I understand... could you please explain?

> I applied it to latest and modified:
> 
> * renamed #class method to #klass since it is used to get
>   class,

Much better!  I'll change the patch.

> * #klass and #function return the Class itself and method ID
>   respectively, not name,

Also much better!  I'll put that change in the patch too.

> * added optional argument for stack_frames to restrict depth
>   (and also to caller),

I think that's a good idea, in case of very deep recursion, but I
didn't worry about it originally because I never recurse that deeply
(I also noticed that #caller didn't worry about the stack being very
deep).  Is that something we need today?

> # and imagined about optional arguments for Enumerable#to_a...

Sounds intriguing, but I can't imagine what it is.  Can you describe
it more?

Thanks!
        Wayne Conrad

> -- 
> Nobu Nakada