diff --git a/lib/execjs/duktape_runtime.rb b/lib/execjs/duktape_runtime.rb index 8ae42a5..b6573d2 100644 --- a/lib/execjs/duktape_runtime.rb +++ b/lib/execjs/duktape_runtime.rb @@ -26,9 +26,7 @@ def eval(source, options = {}) end def call(identifier, *args) - @ctx.call_prop(identifier.split("."), *args) - rescue Exception => e - raise wrap_error(e) + eval "#{identifier}.apply(this, #{::JSON.generate(args)})" end private