summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 829e8cd45a..0f462a3e23 100644
--- a/eval.c
+++ b/eval.c
@@ -9569,6 +9569,17 @@ rb_mod_define_method(int argc, VALUE *argv, VALUE mod)
return body;
}
+/*
+ * call-seq:
+ * obj.define_singleton_method(symbol, method) => new_method
+ * obj.define_singleton_method(symbol) { block } => proc
+ *
+ * Defines a singleton method for the receiver. The _method_
+ * parameter can be a +Proc+ or +Method+ object.
+ * If a block is specified, it is used as the method body.
+ * See <code>Kernel#define_method</code>.
+ */
+
static VALUE
rb_obj_define_method(int argc, VALUE *argv, VALUE obj)
{