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

ruby-changes:21394

From: yugui <ko1@a...>
Date: Sun, 9 Oct 2011 22:20:28 +0900 (JST)
Subject: [ruby-changes:21394] yugui:r33442 (ruby_1_9_3): merges r33379 and r33395 from trunk into ruby_1_9_3.

yugui	2011-10-09 22:18:41 +0900 (Sun, 09 Oct 2011)

  New Revision: 33442

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

  Log:
    merges r33379 and r33395 from trunk into ruby_1_9_3.
    --
    * gc.c (rb_gc_set_params): output GC parameter change messages only
      if -w/-v options are specified. these messages are output to stderr,
      not to stdout. [ruby-core:39795] [Bug #5380]
    
    * test/ruby/test_gc.rb (test_gc_parameter): add test for it.
    --
    * gc.c (rb_gc_set_params): ruby_verbose can be Qnil, so use RTEST.

  Modified files:
    branches/ruby_1_9_3/ChangeLog
    branches/ruby_1_9_3/gc.c
    branches/ruby_1_9_3/test/ruby/test_gc.rb

Index: ruby_1_9_3/ChangeLog
===================================================================
--- ruby_1_9_3/ChangeLog	(revision 33441)
+++ ruby_1_9_3/ChangeLog	(revision 33442)
@@ -1,3 +1,15 @@
+Tue Oct  4 11:44:10 2011  NARUSE, Yui  <naruse@r...>
+
+	* gc.c (rb_gc_set_params): ruby_verbose can be Qnil, so use RTEST.
+
+Mon Oct  3 23:56:39 2011  CHIKANAGA Tomoyuki  <nagachika00@g...>
+
+	* gc.c (rb_gc_set_params): output GC parameter change messages only
+	  if -w/-v options are specified. these messages are output to stderr,
+	  not to stdout. [ruby-core:39795] [Bug #5380]
+
+	* test/ruby/test_gc.rb (test_gc_parameter): add test for it.
+
 Wed Sep 28 09:14:16 2011  Nobuyoshi Nakada  <>
 
 	* configure.in (pthread_np.h): needs pthread.h to be included
Index: ruby_1_9_3/gc.c
===================================================================
--- ruby_1_9_3/gc.c	(revision 33441)
+++ ruby_1_9_3/gc.c	(revision 33442)
@@ -416,7 +416,7 @@
     malloc_limit_ptr = getenv("RUBY_GC_MALLOC_LIMIT");
     if (malloc_limit_ptr != NULL) {
 	int malloc_limit_i = atoi(malloc_limit_ptr);
-	if (ruby_verbose)
+	if (RTEST(ruby_verbose))
 	    fprintf(stderr, "malloc_limit=%d (%d)\n",
 		    malloc_limit_i, initial_malloc_limit);
 	if (malloc_limit_i > 0) {
@@ -427,7 +427,7 @@
     heap_min_slots_ptr = getenv("RUBY_HEAP_MIN_SLOTS");
     if (heap_min_slots_ptr != NULL) {
 	int heap_min_slots_i = atoi(heap_min_slots_ptr);
-	if (ruby_verbose)
+	if (RTEST(ruby_verbose))
 	    fprintf(stderr, "heap_min_slots=%d (%d)\n",
 		    heap_min_slots_i, initial_heap_min_slots);
 	if (heap_min_slots_i > 0) {
@@ -439,7 +439,7 @@
     free_min_ptr = getenv("RUBY_FREE_MIN");
     if (free_min_ptr != NULL) {
 	int free_min_i = atoi(free_min_ptr);
-	if (ruby_verbose)
+	if (RTEST(ruby_verbose))
 	    fprintf(stderr, "free_min=%d (%d)\n", free_min_i, initial_free_min);
 	if (free_min_i > 0) {
 	    initial_free_min = free_min_i;
Index: ruby_1_9_3/test/ruby/test_gc.rb
===================================================================
--- ruby_1_9_3/test/ruby/test_gc.rb	(revision 33441)
+++ ruby_1_9_3/test/ruby/test_gc.rb	(revision 33442)
@@ -93,6 +93,8 @@
       "RUBY_HEAP_MIN_SLOTS" => "100000"
     }
     assert_in_out_err([env, "-e", "exit"], "", [], [], "[ruby-core:39795]")
+    assert_in_out_err([env, "-W0", "-e", "exit"], "", [], [], "[ruby-core:39795]")
+    assert_in_out_err([env, "-W1", "-e", "exit"], "", [], [], "[ruby-core:39795]")
     assert_in_out_err([env, "-w", "-e", "exit"], "", [], /heap_min_slots=100000/, "[ruby-core:39795]")
   end
 end

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

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