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

ruby-changes:27861

From: nagachika <ko1@a...>
Date: Mon, 25 Mar 2013 01:05:42 +0900 (JST)
Subject: [ruby-changes:27861] nagachika:r39913 (ruby_2_0_0): merge revision(s) 39595: [Backport #8014]

nagachika	2013-03-25 01:05:31 +0900 (Mon, 25 Mar 2013)

  New Revision: 39913

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39913

  Log:
    merge revision(s) 39595: [Backport #8014]
    
    * ext/objspace/objspace.c (count_nodes): count also newly added nodes,
      and fix key for unknown node.  patch by tmm1 (Aman Gupta) in
      [ruby-core:53130] [Bug #8014]

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/ext/objspace/objspace.c
    branches/ruby_2_0_0/test/objspace/test_objspace.rb
    branches/ruby_2_0_0/version.h

Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 39912)
+++ ruby_2_0_0/ChangeLog	(revision 39913)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Mon Mar 25 01:05:15 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/objspace/objspace.c (count_nodes): count also newly added nodes,
+	  and fix key for unknown node.  patch by tmm1 (Aman Gupta) in
+	  [ruby-core:53130] [Bug #8014]
+
 Mon Mar 25 01:00:03 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* class.c (rb_prepend_module): check redefinition of built-in optimized
Index: ruby_2_0_0/ext/objspace/objspace.c
===================================================================
--- ruby_2_0_0/ext/objspace/objspace.c	(revision 39912)
+++ ruby_2_0_0/ext/objspace/objspace.c	(revision 39913)
@@ -469,6 +469,7 @@ count_nodes(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/objspace/objspace.c#L469
 		COUNT_NODE(NODE_OP_ASGN2);
 		COUNT_NODE(NODE_OP_ASGN_AND);
 		COUNT_NODE(NODE_OP_ASGN_OR);
+		COUNT_NODE(NODE_OP_CDECL);
 		COUNT_NODE(NODE_CALL);
 		COUNT_NODE(NODE_FCALL);
 		COUNT_NODE(NODE_VCALL);
@@ -502,6 +503,7 @@ count_nodes(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/objspace/objspace.c#L503
 		COUNT_NODE(NODE_ARGS);
 		COUNT_NODE(NODE_ARGS_AUX);
 		COUNT_NODE(NODE_OPT_ARG);
+		COUNT_NODE(NODE_KW_ARG);
 		COUNT_NODE(NODE_POSTARG);
 		COUNT_NODE(NODE_ARGSCAT);
 		COUNT_NODE(NODE_ARGSPUSH);
@@ -519,6 +521,7 @@ count_nodes(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/objspace/objspace.c#L521
 		COUNT_NODE(NODE_SCLASS);
 		COUNT_NODE(NODE_COLON2);
 		COUNT_NODE(NODE_COLON3);
+		COUNT_NODE(NODE_CREF);
 		COUNT_NODE(NODE_DOT2);
 		COUNT_NODE(NODE_DOT3);
 		COUNT_NODE(NODE_FLIP2);
@@ -539,7 +542,7 @@ count_nodes(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/objspace/objspace.c#L542
 		COUNT_NODE(NODE_PRELUDE);
 		COUNT_NODE(NODE_LAMBDA);
 #undef COUNT_NODE
-	      default: node = INT2FIX(nodes[i]);
+	      default: node = INT2FIX(i);
 	    }
 	    rb_hash_aset(hash, node, SIZET2NUM(nodes[i]));
 	}
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 39912)
+++ ruby_2_0_0/version.h	(revision 39913)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2013-03-25"
-#define RUBY_PATCHLEVEL 90
+#define RUBY_PATCHLEVEL 91
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 3
Index: ruby_2_0_0/test/objspace/test_objspace.rb
===================================================================
--- ruby_2_0_0/test/objspace/test_objspace.rb	(revision 39912)
+++ ruby_2_0_0/test/objspace/test_objspace.rb	(revision 39913)
@@ -58,7 +58,9 @@ class TestObjSpace < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/objspace/test_objspace.rb#L58
     assert_equal(false, res.empty?)
     arg = {}
     ObjectSpace.count_nodes(arg)
-    assert_equal(false, arg.empty?)
+    assert_not_empty(arg)
+    bug8014 = '[ruby-core:53130] [Bug #8014]'
+    assert_empty(arg.select {|k, v| !(Symbol === k && Integer === v)}, bug8014)
   end
 
   def test_count_tdata_objects

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r39595


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

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