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

ruby-changes:4759

From: ko1@a...
Date: Thu, 1 May 2008 23:05:21 +0900 (JST)
Subject: [ruby-changes:4759] matz - Ruby:r16253 (trunk): * hash.c (rb_hash_s_create): should access converted hash value.

matz	2008-05-01 23:04:38 +0900 (Thu, 01 May 2008)

  New Revision: 16253

  Modified files:
    trunk/ChangeLog
    trunk/hash.c

  Log:
    * hash.c (rb_hash_s_create): should access converted hash value.
      [ruby-dev:34555]

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/hash.c?r1=16253&r2=16252&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16253&r2=16252&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 16252)
+++ ChangeLog	(revision 16253)
@@ -1,3 +1,8 @@
+Thu May  1 20:47:30 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* hash.c (rb_hash_s_create): should access converted hash value.
+	  [ruby-dev:34555]
+
 Thu May  1 20:31:09 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* test/ruby/test_parse.rb (TestParse::test_void_expr_stmts_value):
Index: hash.c
===================================================================
--- hash.c	(revision 16252)
+++ hash.c	(revision 16253)
@@ -344,8 +344,8 @@
 	tmp = rb_hash_s_try_convert(Qnil, argv[0]);
 	if (!NIL_P(tmp)) {
 	    hash = hash_alloc(klass);
-	    if (RHASH(argv[0])->ntbl) {
-		RHASH(hash)->ntbl = st_copy(RHASH(argv[0])->ntbl);
+	    if (RHASH(tmp)->ntbl) {
+		RHASH(hash)->ntbl = st_copy(RHASH(tmp)->ntbl);
 	    }
 	    return hash;
 	}

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

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