[前][次][番号順一覧][スレッド一覧]

ruby-changes:2017

From: ko1@a...
Date: 24 Sep 2007 22:18:12 +0900
Subject: [ruby-changes:2017] matz - Ruby:r13508 (trunk): * hash.c (hash_i): avoid too frequent hash conflict where key and

matz	2007-09-24 22:18:02 +0900 (Mon, 24 Sep 2007)

  New Revision: 13508

  Modified files:
    trunk/ChangeLog
    trunk/hash.c

  Log:
    * hash.c (hash_i): avoid too frequent hash conflict where key and
      value are same.  a patch from Yusuke ENDOH <mame AT tsg.ne.jp>.
      [ruby-dev:31802]

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/hash.c?r1=13508&r2=13507
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13508&r2=13507

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 13507)
+++ ChangeLog	(revision 13508)
@@ -2,6 +2,10 @@
 
 	* lib/weakref.rb (WeakRef): remove debug print.  [ruby-dev:31799]
 
+	* hash.c (hash_i): avoid too frequent hash conflict where key and
+	  value are same.  a patch from Yusuke ENDOH <mame AT tsg.ne.jp>.
+	  [ruby-dev:31802]
+
 Mon Sep 24 17:56:21 2007  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/strscan/strscan.c (strscan_initialize, strscan_getch): use the
Index: hash.c
===================================================================
--- hash.c	(revision 13507)
+++ hash.c	(revision 13508)
@@ -1464,6 +1464,7 @@
 {
     if (key == Qundef) return ST_CONTINUE;
     *hval ^= rb_hash(key);
+    *hval *= 137;
     *hval ^= rb_hash(val);
     return ST_CONTINUE;
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]