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

what goes in should come out, fixes putting a proc property :

`o.inc = proc { |i| i + 1 }; o.inc.call(1) == 2`
This commit is contained in:
kares 2012-01-21 12:47:23 +01:00
parent e0cb01526a
commit 4f2c48d0b1

View file

@ -91,8 +91,7 @@ class Java::OrgMozillaJavascript::ScriptableObject
if s_name[-1, 1] == '=' && args.size == 1 # writer -> JS put
self[ s_name[0...-1] ] = args[0]
else
property = ScriptableObject.getProperty(self, s_name)
if property && property != Scriptable::NOT_FOUND
if property = self[s_name]
if property.is_a?(Rhino::JS::Function)
begin
context = Rhino::JS::Context.enter