Regression after migrating from Prototype 1.5.1.1 to 1.6 on Hash

0 views
Skip to first unread message

Jean-Philippe Encausse

unread,
Nov 8, 2007, 6:07:36 AM11/8/07
to rubyonrail...@googlegroups.com
Hi !

It seems we have found a little regression after migrating from
Prototype 1.5.1.1 to 1.6
on Hash object:


var map = { hello: 42 };
var prototypeMap = $H(map);

var msg = "map.hello: " + map.hello + "<br>\n" +
"prototypeMap.hello: " + prototypeMap.hello ;


On prototype 1.5.1.1 the result is :
map.hello: 42
prototypeMap.hello: 42

On prototype 1.6 the result is :
map.hello: 42
prototypeMap.hello: undefined


I can send you a zip file that demonstrate the issue
Regards,
Jp
--
Jean-Philippe Encausse - Veille / R&D Jalios SA
Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com
GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net
Mob: +33 6 82 12 56 99 - Job: +33 1 39 23 92 83 - Tel: +33 1 39 18 90 15
Do it Once, Use it Twice ~ Do it Twice, Make It Once

Richard Quadling

unread,
Nov 8, 2007, 6:56:46 AM11/8/07
to rubyonrail...@googlegroups.com
prototypeMap.get('hello');

See http://prototypejs.org/2007/10/16/prototype-1-6-0-rc1-changes-to-the-class-and-event-apis-hash-rewrite-and-bug-fixes

Specifically "Complete rewrite of the Hash class"


--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

Reply all
Reply to author
Forward
0 new messages