#21 ✓resolved
John Barnette

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

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages