summaryrefslogtreecommitdiff
path: root/vm_args.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-10 23:42:01 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-10 23:42:01 (GMT)
commitc7edd997e87d609feee894bf61b45f7f0a956eba (patch)
tree8c91f908870749c1bf6c53786745126142a58e06 /vm_args.c
parent85647d9f2b4b2da17827cc1d613f425748a39b3f (diff)
* vm.c: use VM_ASSERT instead of assert().
* vm_args.c: ditto. * vm_insnhelper.c: ditto. * vm_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_args.c')
-rw-r--r--vm_args.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/vm_args.c b/vm_args.c
index 32a3cfa..e466b10 100644
--- a/vm_args.c
+++ b/vm_args.c
@@ -49,7 +49,7 @@ args_extend(struct args_info *args, const int min_argc)
if (args->rest) {
args->rest = rb_ary_dup(args->rest);
- assert(args->rest_index == 0);
+ VM_ASSERT(args->rest_index == 0);
for (i=args->argc + RARRAY_LENINT(args->rest); i<min_argc; i++) {
rb_ary_push(args->rest, Qnil);
}
@@ -78,7 +78,7 @@ args_reduce(struct args_info *args, int over_argc)
}
}
- assert(args->argc >= over_argc);
+ VM_ASSERT(args->argc >= over_argc);
args->argc -= over_argc;
}
@@ -194,7 +194,7 @@ args_pop_keyword_hash(struct args_info *args, VALUE *kw_hash_ptr, rb_thread_t *t
if (args->rest == Qfalse) {
from_argv:
- assert(args->argc > 0);
+ VM_ASSERT(args->argc > 0);
*kw_hash_ptr = args->argv[args->argc-1];
if (keyword_hash_p(kw_hash_ptr, &rest_hash, th)) {
@@ -652,11 +652,11 @@ setup_parameters_complex(rb_thread_t * const th, const rb_iseq_t * const iseq, r
arg.vals = arg.keys + kw_len;
arg.argc = 0;
rb_hash_foreach(keyword_hash, fill_keys_values, (VALUE)&arg);
- assert(arg.argc == kw_len);
+ VM_ASSERT(arg.argc == kw_len);
args_setup_kw_parameters(arg.vals, kw_len, arg.keys, iseq, klocals);
}
else {
- assert(args_argc(args) == 0);
+ VM_ASSERT(args_argc(args) == 0);
args_setup_kw_parameters(NULL, 0, NULL, iseq, klocals);
}
}