diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-30 12:55:24 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-30 12:55:24 +0000 |
commit | c8f77d37bcc297af49106dfc398c94d4db867a17 (patch) | |
tree | cd5952b662bd568b5c09514ca79e35de9a95991f | |
parent | bcdcee47381aa7314a6b249074078f8298d12c7a (diff) |
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 <miguel@miguel.cc>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@67703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | proc.c | 6 | ||||
-rw-r--r-- | version.h | 2 |
2 files changed, 3 insertions, 5 deletions
@@ -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 <code>instance_eval</code>, a point that is - * tricky to demonstrate because <code>define_method</code> is private. - * (This is why we resort to the +send+ hack in this example.) + * is evaluated using <code>instance_eval</code>. * * 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 @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.5.6" #define RUBY_RELEASE_DATE "2019-04-30" -#define RUBY_PATCHLEVEL 160 +#define RUBY_PATCHLEVEL 161 #define RUBY_RELEASE_YEAR 2019 #define RUBY_RELEASE_MONTH 4 |