Skip to content

Commit

Permalink
object.c: fix {Module,Class}.new rdoc [ci skip]
Browse files Browse the repository at this point in the history
* 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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Aug 24, 2016
1 parent 92a0954 commit 20e0f1e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
@@ -1,3 +1,11 @@
Wed Aug 24 12:57:56 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>

* 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@ruby-lang.org>

* test/psych/test_psych.rb (test_load_file_with_fallback): fix
Expand Down
4 changes: 2 additions & 2 deletions object.c
Expand Up @@ -1701,7 +1701,7 @@ rb_class_s_alloc(VALUE klass)
*
* 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
Expand Down Expand Up @@ -1750,7 +1750,7 @@ rb_mod_initialize_clone(VALUE clone, VALUE orig)
* 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
Expand Down

0 comments on commit 20e0f1e

Please sign in to comment.