Ticket #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: | ||
| Blocking: | Blocked by: |
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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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