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

make sure Ruby::Function#call 'redefines' Rhino's native (aliased) BaseFunction#__call__ thus resolving correctly with native as well as ruby functions when invoked from Ruby

This commit is contained in:
kares 2012-01-13 12:31:01 +01:00
parent 28a9322a3e
commit 212f047cfa

View file

@ -171,6 +171,10 @@ module Rhino
Rhino.to_javascript(result, scope) Rhino.to_javascript(result, scope)
end end
# make sure redefined :call is aliased not the one "inherited" from
# JS::BaseFunction#call when invoking __call__ (@see rhino_ext.rb)
alias_method :__call__, :call
end end
class Constructor < Function class Constructor < Function