delete on an arguments[i] not working correctly

VERIFIED FIXED

Status

Rhino
Core
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: Phil Schwartau, Assigned: Norris Boyd)

Tracking

Details

(Reporter)

Description

17 years ago
The following testcase is passing in SpiderMonkey, but failing in Rhino: 

               js/tests/ecma_3/Function/arguments-001.js


In Rhino : test FAILS
function g(){delete arguments[0]; return arguments[0]}
g(42)
42   //should print 'undefined'


In SpiderMonkey: test PASSES
function g(){delete arguments[0]; return arguments[0]}
g(42)
undefined  



Brendan (from bug 72884):

"Per ECMA-262, delete on an arguments[i] should succeed and remove that property  
from the arguments object, leaving any get of it after the delete to evaluate  
to undefined."
(Assignee)

Comment 1

17 years ago
Fixed: 

Checking in Arguments.java;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/Arguments.java,v  <--  Argu
ments.java
new revision: 1.11; previous revision: 1.10
done
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
(Reporter)

Comment 2

17 years ago
Testcase passing in rhino/rhinoi shells. Marking Verified - 
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.