mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* proc.c (rb_block_arity): raise ArgumentError if no block given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f3a63c3175
commit
7317bda66a
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Jul 16 11:12:03 2013 Masaki Matsushita <glass.saga@gmail.com>
|
||||
|
||||
* proc.c (rb_block_arity): raise ArgumentError if no block given.
|
||||
|
||||
Tue Jul 16 08:15:22 2013 Zachary Scott <e@zzak.io>
|
||||
|
||||
* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] document top-level
|
||||
|
|
4
proc.c
4
proc.c
|
@ -722,9 +722,11 @@ rb_block_arity(void)
|
|||
rb_thread_t *th = GET_THREAD();
|
||||
rb_control_frame_t *cfp = th->cfp;
|
||||
rb_block_t *block = rb_vm_control_frame_block_ptr(cfp);
|
||||
VALUE proc_value = block->proc;
|
||||
VALUE proc_value;
|
||||
|
||||
if (!block) rb_raise(rb_eArgError, "no block given");
|
||||
min = rb_block_min_max_arity(block, &max);
|
||||
proc_value = block->proc;
|
||||
if (proc_value) {
|
||||
rb_proc_t *proc;
|
||||
GetProcPtr(proc_value, proc);
|
||||
|
|
Loading…
Reference in a new issue