From e38066b046e793986279f10f02b05957b9670c04 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 24 Aug 2016 03:57:58 +0000 Subject: 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'object.c') diff --git a/object.c b/object.c index d265d9ff9e..c9649253b1 100644 --- a/object.c +++ b/object.c @@ -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 module_eval. + * module like module_eval. * * fred = Module.new do * def meth1 @@ -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 * class_eval. * * fred = Class.new do -- cgit v1.2.3