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

ruby-changes:27651

From: nagachika <ko1@a...>
Date: Mon, 11 Mar 2013 00:51:00 +0900 (JST)
Subject: [ruby-changes:27651] nagachika:r39703 (ruby_2_0_0): merge revision(s) 39484,39485: [Backport #7952]

nagachika	2013-03-11 00:50:49 +0900 (Mon, 11 Mar 2013)

  New Revision: 39703

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

  Log:
    merge revision(s) 39484,39485: [Backport #7952]
    
    * thread.c: Document Thread::new, clean up ::fork and mention calling
      super if subclassing Thread

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    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 39702)
+++ ruby_2_0_0/ChangeLog	(revision 39703)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Mon Mar 11 00:50:21 2013  Zachary Scott  <zachary@z...>
+
+	* thread.c: Document Thread::new, clean up ::fork and mention calling
+	  super if subclassing Thread
+
 Mon Mar 11 00:47:47 2013  Akinori MUSHA  <knu@i...>
 
 	* configure.in (unexpand_shvar): Use the numeric comparison
Index: ruby_2_0_0/thread.c
===================================================================
--- ruby_2_0_0/thread.c	(revision 39702)
+++ ruby_2_0_0/thread.c	(revision 39703)
@@ -622,7 +622,26 @@ thread_create_core(VALUE thval, VALUE ar https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/thread.c#L622
     return thval;
 }
 
-/* :nodoc: */
+/*
+ * call-seq:
+ *  Thread.new { ... }			-> thread
+ *  Thread.new(*args, &proc)		-> thread
+ *  Thread.new(*args) { |args| ... }	-> thread
+ *
+ *  Creates a new thread executing the given block.
+ *
+ *  Any +args+ given to ::new will be passed to the block:
+ *
+ *	arr = []
+ *	a, b, c = 1, 2, 3
+ *	Thread.new(a,b,c) { |d,e,f| arr << d << e << f }.join
+ *	arr #=> [1, 2, 3]
+ *
+ *  A ThreadError exception is raised if ::new is called without a block.
+ *
+ *  If you're going to subclass Thread, be sure to call super in your
+ *  +initialize+ method, otherwise a ThreadError will be raised.
+ */
 static VALUE
 thread_s_new(int argc, VALUE *argv, VALUE klass)
 {
@@ -646,9 +665,9 @@ thread_s_new(int argc, VALUE *argv, VALU https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/thread.c#L665
  *     Thread.start([args]*) {|args| block }   -> thread
  *     Thread.fork([args]*) {|args| block }    -> thread
  *
- *  Basically the same as <code>Thread::new</code>. However, if class
- *  <code>Thread</code> is subclassed, then calling <code>start</code> in that
- *  subclass will not invoke the subclass's <code>initialize</code> method.
+ *  Basically the same as ::new. However, if class Thread is subclassed, then
+ *  calling +start+ in that subclass will not invoke the subclass's
+ *  +initialize+ method.
  */
 
 static VALUE
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 39702)
+++ ruby_2_0_0/version.h	(revision 39703)
@@ -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-11"
-#define RUBY_PATCHLEVEL 47
+#define RUBY_PATCHLEVEL 48
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 3

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r39484-39485


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

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