1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

Merge remote-tracking branch 'bronson/patch-1'

This commit is contained in:
Charles Lowell 2014-01-03 11:52:22 +02:00
commit 59508cc8a4

View file

@ -31,6 +31,12 @@ evaluate some simple JavaScript
cxt = V8::Context.new
cxt.eval('7 * 6') #=> 42
call JavaScript functions
cxt.eval "function isTruthy(arg) { return !!arg }"
cxt[:isTruthy].call(' ') #=> true
cxt.scope.isTruthy(0) #=> false
embed values into the scope of your context
cxt['foo'] = "bar"