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

Ticket #7136 (closed defect: duplicate)

Opened 2 years ago

Last modified 2 years ago

[PATCH] minor tweak to Hash constructor

Reported by: mislav Assigned to: sam
Priority: low Milestone: 1.x
Component: Prototype Version:
Severity: minor Keywords:
Cc:

Description

This patch does not change Hash functionality, it just prevents Object.extend to happen when a Hash is passed as an argument to new Hash(). Without this patch some unnecessary function copying would occur, we avoid it by using merge().

It also adds missing tests for Hash constructor methods: $H() and new Hash(). They are not equivalent, as the former does not clone the object when passed a Hash, and the latter clones it.

Attachments

hash.diff (1.4 kB) - added by mislav on 01/17/07 19:53:52.
hash.2.diff (1.6 kB) - added by Tobie on 02/20/07 20:27:09.

Change History

01/17/07 19:53:52 changed by mislav

  • attachment hash.diff added.

02/20/07 20:27:09 changed by Tobie

  • attachment hash.2.diff added.

03/08/07 21:57:32 changed by mislav

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

now in #7421