"Christoph Neubauer" <christoph.neubauer / siemens.com> schrieb im
Newsbeitrag news:cdgjre$ps6$1 / news.siemens.at...
>
> "Robert Klemme" <bob.news / gmx.net> wrote in message
> news:2m215lFi754cU1 / uni-berlin.de...
> <snip>
>
> >
> > Do you know Kernel#set_trace_func() ?  That'll do what you need much
more
> > easily IMHO.
> > http://www.ruby-doc.org/docs/rdoc/1.9/classes/Kernel.html#M001573
> >
> > (It's already present in 1.6.8)
>
> Thanks, I'll follow that link
>
> >
> > > My question is:
> > > How do I know the names of the formal arguments of the actual caller
of
> > > TraceEntry ?
> >
> > You can't other that providing them explicitely, for example by using
a
> > hash:
> >
>
> I already thougt about a hash-solution, but I hoped to get something
like a
> hash implicitely,
> such minimizing work and possible typo errors.

Not without doing work somewhere else.  You could somehow evaluate
__FILE__ and __LINE__ or caller to get the source line number and try to
extract argument names from the source file.  But this is error prone and
doesn't work well with eval and such.

> Many thanks for fast answer,

You're welcome!

    robert