"Bill Atkins" <batkins57 / myway.com> schrieb im Newsbeitrag
news:20040312040924.AB9DF3977 / mprdmxin.myway.com...
>
> Is there any way to get a list of the arguments passed to a method's
caller?  I am aware of Kernel.caller, but it seems like it just gives a
method name.  I would like something like this:
>
> class Test
>     def test1(x, y)
>         test2
>     end
> end
>
> class Test2
>     def test
>         # here I'd like to have an Array containing two 2's (the
>         # values passed to Test.test1)
>     end
> end
>
> Test.new.test1(2, 2)

If you know the argument names you might be able to hack something together
with set_trace_func.  But why don't you just pass them on? :-)

Regards

    robert