support ruby Procs in jsland
Reported by John Barnette | April 1st, 2008 @ 04:32 PM
Make this work:
ctx[:alert] = lambda { |m| puts m }
ctx.evaluate("alert('hai!')")
The sticky wicket here is that the ContextPrivate slot can't be used to store a pointer to the Ruby lambda: a JSFunction backed by a native method already uses that slot to stash the function pointer.
Probably still need to do some sort of JSland function name munging to include the oid of the rubyland Proc.
Comments and changes to this ticket
-
John Barnette April 2nd, 2008 @ 01:56 AM
- State changed from new to resolved
Fixed, but there are problems with finalization. I'll make some new tickets.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป