From c8f77d37bcc297af49106dfc398c94d4db867a17 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 30 Apr 2019 12:55:24 +0000 Subject: merge revision(s) 64057: [Backport #14952] Remove obsolete comment from Module#define_method documentation Since 2.5, Module#define_method is public. (feature #14133) Co-Authored-By: Miguel Landaeta git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@67703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- proc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'proc.c') diff --git a/proc.c b/proc.c index dfe9acd5b7..b14d1444e5 100644 --- a/proc.c +++ b/proc.c @@ -1859,16 +1859,14 @@ rb_mod_public_instance_method(VALUE mod, VALUE vid) * Defines an instance method in the receiver. The _method_ * parameter can be a +Proc+, a +Method+ or an +UnboundMethod+ object. * If a block is specified, it is used as the method body. This block - * is evaluated using instance_eval, a point that is - * tricky to demonstrate because define_method is private. - * (This is why we resort to the +send+ hack in this example.) + * is evaluated using instance_eval. * * class A * def fred * puts "In Fred" * end * def create_method(name, &block) - * self.class.send(:define_method, name, &block) + * self.class.define_method(name, &block) * end * define_method(:wilma) { puts "Charge it!" } * end -- cgit v1.2.3