Hi,
I've stuck with the need to allow JS call arbitrary methods on an object:
class A
def method_missing method, *args, &block
puts "method #{method} called"
end
end
cxt = V8::Context.new
cxt['a'] = A.new
cxt.eval("a.some_method()") # V8::JSError: Object #<rb::A> has no method 'some_method'
Do you think that it's a security flaw to allow the script call any method on an object?
Probably we should allow this if the object has metod_missing defined and only throw JSError if method_missing throws something?
BR, Phil