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

ruby-changes:28328

From: nagachika <ko1@a...>
Date: Sat, 20 Apr 2013 01:19:23 +0900 (JST)
Subject: [ruby-changes:28328] nagachika:r40380 (ruby_2_0_0): merge revision(s) 40000: [Backport #8097]

nagachika	2013-04-20 01:16:55 +0900 (Sat, 20 Apr 2013)

  New Revision: 40380

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

  Log:
    merge revision(s) 40000: [Backport #8097]
    
    * thread.c (rb_mutex_synchronize_m): yield no block params.  patch by
      splattael (Peter Suschlik) in [ruby-core:53773] [Bug #8097].
      fix GH-266.

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/test/ruby/test_thread.rb
    branches/ruby_2_0_0/thread.c
    branches/ruby_2_0_0/version.h

Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 40379)
+++ ruby_2_0_0/ChangeLog	(revision 40380)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Sat Apr 20 01:14:08 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* thread.c (rb_mutex_synchronize_m): yield no block params.  patch by
+	  splattael (Peter Suschlik) in [ruby-core:53773] [Bug #8097].
+	  fix GH-266.
+
 Sat Apr 20 00:41:10 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* compile.c (iseq_compile_each): append keyword hash to argument array
Index: ruby_2_0_0/thread.c
===================================================================
--- ruby_2_0_0/thread.c	(revision 40379)
+++ ruby_2_0_0/thread.c	(revision 40380)
@@ -4521,7 +4521,7 @@ rb_mutex_synchronize_m(VALUE self, VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/thread.c#L4521
 	rb_raise(rb_eThreadError, "must be called with a block");
     }
 
-    return rb_mutex_synchronize(self, rb_yield, Qnil);
+    return rb_mutex_synchronize(self, rb_yield, Qundef);
 }
 
 void rb_mutex_allow_trap(VALUE self, int val)
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 40379)
+++ ruby_2_0_0/version.h	(revision 40380)
@@ -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-04-20"
-#define RUBY_PATCHLEVEL 147
+#define RUBY_PATCHLEVEL 148
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 4
Index: ruby_2_0_0/test/ruby/test_thread.rb
===================================================================
--- ruby_2_0_0/test/ruby/test_thread.rb	(revision 40379)
+++ ruby_2_0_0/test/ruby/test_thread.rb	(revision 40380)
@@ -120,6 +120,11 @@ class TestThread < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_thread.rb#L120
     assert_equal(max * max * max, r)
   end
 
+  def test_mutex_synchronize_yields_no_block_params
+    bug8097 = '[ruby-core:53424] [Bug #8097]'
+    assert_empty(Mutex.new.synchronize {|*params| break params}, bug8097)
+  end
+
   def test_local_barrier
     dir = File.dirname(__FILE__)
     lbtest = File.join(dir, "lbtest.rb")

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


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

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