summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-14 05:35:21 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-14 05:35:21 +0000
commita28d1eff6534328cae5363bbf0cc26cd0a18b948 (patch)
tree846b20ae8ec12c856eca10bcf108f00646e0fd16 /proc.c
parentd551b78d4ad27c1c9a4026d11896d4630a1ffed8 (diff)
* proc.c (rb_mod_define_method): now they return the symbols of the
defined methods, not the methods/procs themselves. [ruby-dev:42151] [Feature #3753] * NEWS: documents about above change and def-expr (see r42337). * test/ruby/test_module.rb: tests about above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/proc.c b/proc.c
index 6fd3981ef6..e45d30bd8e 100644
--- a/proc.c
+++ b/proc.c
@@ -1569,8 +1569,8 @@ rb_mod_public_instance_method(VALUE mod, VALUE vid)
/*
* call-seq:
- * define_method(symbol, method) -> new_method
- * define_method(symbol) { block } -> proc
+ * define_method(symbol, method) -> symbol
+ * define_method(symbol) { block } -> symbol
*
* Defines an instance method in the receiver. The _method_
* parameter can be a +Proc+, a +Method+ or an +UnboundMethod+ object.
@@ -1667,7 +1667,7 @@ rb_mod_define_method(int argc, VALUE *argv, VALUE mod)
rb_raise(rb_eTypeError, "wrong argument type (expected Proc/Method)");
}
- return body;
+ return ID2SYM(id);
}
/*