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

ruby-changes:43922

From: nobu <ko1@a...>
Date: Wed, 24 Aug 2016 12:58:05 +0900 (JST)
Subject: [ruby-changes:43922] nobu:r55994 (trunk): object.c: fix {Module, Class}.new rdoc [ci skip]

nobu	2016-08-24 12:57:58 +0900 (Wed, 24 Aug 2016)

  New Revision: 55994

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55994

  Log:
    object.c: fix {Module,Class}.new rdoc [ci skip]
    
    * object.c (rb_mod_initialize, rb_class_initialize): [DOC] these
      methods do not invoke module_eval/class_eval, just eval the
      given block under the new module/class but sharing the context
      with the surrounding scope like those methods.
      [ruby-core:77023] [Bug #12696]

  Modified files:
    trunk/ChangeLog
    trunk/object.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 55993)
+++ ChangeLog	(revision 55994)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Aug 24 12:57:56 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* object.c (rb_mod_initialize, rb_class_initialize): [DOC] these
+	  methods do not invoke module_eval/class_eval, just eval the
+	  given block under the new module/class but sharing the context
+	  with the surrounding scope like those methods.
+	  [ruby-core:77023] [Bug #12696]
+
 Tue Aug 23 10:34:40 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* test/psych/test_psych.rb (test_load_file_with_fallback): fix
Index: object.c
===================================================================
--- object.c	(revision 55993)
+++ object.c	(revision 55994)
@@ -1701,7 +1701,7 @@ rb_class_s_alloc(VALUE klass) https://github.com/ruby/ruby/blob/trunk/object.c#L1701
  *
  *  Creates a new anonymous module. If a block is given, it is passed
  *  the module object, and the block is evaluated in the context of this
- *  module using <code>module_eval</code>.
+ *  module like <code>module_eval</code>.
  *
  *     fred = Module.new do
  *       def meth1
@@ -1750,7 +1750,7 @@ rb_mod_initialize_clone(VALUE clone, VAL https://github.com/ruby/ruby/blob/trunk/object.c#L1750
  *  class a name by assigning the class object to a constant.
  *
  *  If a block is given, it is passed the class object, and the block
- *  is evaluated in the context of this class using
+ *  is evaluated in the context of this class like
  *  <code>class_eval</code>.
  *
  *     fred = Class.new do

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

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