-----Messaggio originale-----
Da: Steve Hart [mailto:steve / rtsw.co.uk] 
Inviato: venerd2 dicembre 2011 03:55
A: ruby-talk ML
Oggetto: embedded ruby event hooks

Hi
We have been running ruby for about 7 years as an embedded interpreter and
we are trying to upgrade from 1.8.7 to 1.9.3. One of the things we do is to
add an event hook using rb_add_event_hook for event type RUBY_EVENT_CALL
This allows us to 'know' what ruby method is being called.
In our function for the hook proc we use the passed in ID value to tell us
the name of the ruby method that is about to run. This works well in 1.8.7.

In 1.9.3 the id passed in is always 0. Looking thru the code I can see that
this is marked in insns.def as 'TODO' (insns.def line 875 -
EXEC_EVENT_HOOK(th, flag, GET_SELF(), 0, 0 /* TODO: id, klass */); I'm not
sure yet what insns.def is or how it works - but without the method id our
code dies.

Is there any other way of finding the method name that is about to be
called?
Any help gratefully received.
Cheers
Steve

--
Posted via http://www.ruby-forum.com/.


 
 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
 
 Sponsor:
 Conto Arancio al 4,20%. Soldi sempre disponibili, zero spese, aprilo in due minuti!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid923&d)-12