Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7421 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] Safari bug in $H

Reported by: Tobie Assigned to: sam
Priority: high Milestone: 1.x
Component: Prototype Version: edge
Severity: major Keywords: bug safari for...in ready
Cc:

Description

Safari has a pretty nasty bug: the for...in loop iterates over shadowed properties. (Properties of the object's constructor's prototype which have been overwritten by a proprty of the object).

This corrects the issue for $H().

Attachments

hash.diff (3.2 kB) - added by Tobie on 01/29/07 06:05:06.
js & tests
hash.2.diff (2.5 kB) - added by Tobie on 01/29/07 11:55:28.
and a version with browser sniffing
forinloop.diff (2.6 kB) - added by Tobie on 02/23/07 03:11:30.
final patch, ready to be applied (redefines Hash.prototype._each if the bug is present)
hash.3.diff (5.3 kB) - added by mislav on 03/08/07 22:00:08.
final, merged with other related patches

Change History

01/29/07 06:05:06 changed by Tobie

  • attachment hash.diff added.

js & tests

01/29/07 11:55:28 changed by Tobie

  • attachment hash.2.diff added.

and a version with browser sniffing

02/13/07 15:07:10 changed by mislav

  • keywords changed from bug safari for...in to bug safari for...in ready.

Note that this patch also fixes the double encodeURIComponent issue!

02/23/07 03:11:30 changed by Tobie

  • attachment forinloop.diff added.

final patch, ready to be applied (redefines Hash.prototype._each if the bug is present)

03/08/07 21:59:29 changed by mislav

merged with #7702, #7136

03/08/07 22:00:08 changed by mislav

  • attachment hash.3.diff added.

final, merged with other related patches

03/09/07 05:45:03 changed by Tobie

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [6362].