aboutsummaryrefslogtreecommitdiffstats
path: root/proc.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-04 15:50:30 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-04 15:54:09 +0900
commit8da7f4abc779c6549833d718336d75aac98494b8 (patch)
treee58d5fe267469dc1a1cea353b1ac725e30062097 /proc.c
parentcf4a6b5e7b36a0b4f71d7abba0c0685c631f19fa (diff)
downloadruby-8da7f4abc779c6549833d718336d75aac98494b8.tar.gz
[DOC] Update Proc.new without a block [ci skip]
[Feature #10499] [Feature #15554]
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/proc.c b/proc.c
index 8a0a0c0967..d0870042f8 100644
--- a/proc.c
+++ b/proc.c
@@ -799,18 +799,15 @@ proc_new(VALUE klass, int8_t is_lambda, int8_t kernel)
/*
* call-seq:
* Proc.new {|...| block } -> a_proc
- * Proc.new -> a_proc
*
- * Creates a new Proc object, bound to the current context. Proc::new
- * may be called without a block only within a method with an
- * attached block, in which case that block is converted to the Proc
- * object.
+ * Creates a new Proc object, bound to the current context.
*
- * def proc_from
- * Proc.new
- * end
- * proc = proc_from { "hello" }
+ * proc = Proc.new { "hello" }
* proc.call #=> "hello"
+ *
+ * Raises ArgumentError if called without a block.
+ *
+ * Proc.new #=> ArgumentError
*/
static VALUE