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:
parent
28a9322a3e
commit
212f047cfa
1 changed files with 4 additions and 0 deletions
|
@ -171,6 +171,10 @@ module Rhino
|
|||
Rhino.to_javascript(result, scope)
|
||||
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
|
||||
|
||||
class Constructor < Function
|
||||
|
|
Loading…
Reference in a new issue