Bug Tracker

Opened 8 years ago

Closed 8 years ago

#11386 closed bug (cantfix)

for ... in syntax works incorrectly with arguments object on safari 5

Reported by: folioforsto Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

Description

for in syntax won't iterate through every property of a arguments object in a function context.

This bug affects the jquery.extend function.

Because the implementation trys to iterate through every property of an object using this approach.

Implementation: https://github.com/jquery/jquery/blob/master/src/core.js#L333

My currently work around for this is to create a copy of the arguments object before passing it to the jquery.extend function.

See a demo of the bug: http://jsbin.com/akanov/7

Tested Chrome and it works as expected.

Change History (1)

comment:1 Changed 8 years ago by dmethvin

Resolution: cantfix
Status: newclosed

This should be reported to Safari. It does not make sense to work around it inside jQuery.

Note: See TracTickets for help on using tickets.