mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
![]() This adds the ability embed basic Ruby code blocks into a javascript context and invoke it. cxt = V8::Context.new cxt['twice'] = lambda {|str| "#{str}#{str}"} cxt.eval('twice("hi")') #=> "hihi" Note that error handling is not accounted for yet. If an exception happens inside the called proc, it will cause terrible, awful things to happen because portions of the C++ stack will not be unwound leaving the Isolate in an indeterminate state. |
||
---|---|---|
.. | ||
access | ||
c | ||
conversion | ||
access.rb | ||
array.rb | ||
c.rb | ||
context.rb | ||
conversion.rb | ||
date.rb | ||
error.rb | ||
function.rb | ||
isolate.rb | ||
object.rb | ||
retained_objects.rb | ||
stack.rb | ||
version.rb | ||
weak.rb |