ruby-changes:4198
From: ko1@a...
Date: Tue, 4 Mar 2008 19:20:13 +0900 (JST)
Subject: [ruby-changes:4198] matz - Ruby:r15688 (trunk): * hash.c (hash_equal): two hash tables are different when internal
matz 2008-03-04 19:19:55 +0900 (Tue, 04 Mar 2008)
New Revision: 15688
Modified files:
trunk/ChangeLog
trunk/hash.c
Log:
* hash.c (hash_equal): two hash tables are different when internal
comparison table differ. [ruby-dev:33989]
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/hash.c?r1=15688&r2=15687&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15688&r2=15687&diff_format=u
Index: ChangeLog
===================================================================
--- ChangeLog (revision 15687)
+++ ChangeLog (revision 15688)
@@ -3,6 +3,9 @@
* hash.c (rb_hash_aset): should not copy key string when
compare_by_identity is set. [ruby-dev:33604]
+ * hash.c (hash_equal): two hash tables are different when internal
+ comparison table differ. [ruby-dev:33989]
+
Tue Mar 4 16:29:06 2008 Yukihiro Matsumoto <matz@r...>
* parse.y (parser_yylex): disallow non digits '0o' expression.
Index: hash.c
===================================================================
--- hash.c (revision 15687)
+++ hash.c (revision 15688)
@@ -1397,6 +1397,8 @@
return Qfalse;
if (!RHASH(hash1)->ntbl || !RHASH(hash2)->ntbl)
return Qtrue;
+ if (RHASH(hash1)->ntbl->type != RHASH(hash2)->ntbl->type)
+ return Qfalse;
#if 0
if (!(rb_equal(RHASH(hash1)->ifnone, RHASH(hash2)->ifnone) &&
FL_TEST(hash1, HASH_PROC_DEFAULT) == FL_TEST(hash2, HASH_PROC_DEFAULT)))
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/