summaryrefslogtreecommitdiff
path: root/eval_jump.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-05 05:22:17 (GMT)
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-05 05:22:17 (GMT)
commit39787ea14db33dd4265d7f6271cd2d59ccaeff37 (patch)
tree49743edd8a3dbb4fa4cfea6c472f3398edfe0639 /eval_jump.c
parent413db1b036083f76a2b34895af3c8a3204e174f2 (diff)
* numeric.c (fix_to_s): avoid rb_scan_args() when no argument
given. * bignum.c (rb_big_to_s): ditto. * enum.c (enum_first): ditto. * eval_jump.c (rb_f_catch): ditto. * io.c (rb_obj_display): ditto. * class.c (rb_obj_singleton_methods): ditto. * object.c (rb_class_initialize): ditto. * random.c (rb_f_srand): ditto. * range.c (range_step): ditto. * re.c (rb_reg_s_last_match): ditto. * string.c (rb_str_to_i): ditto. * string.c (rb_str_each_line): ditto. * string.c (rb_str_chomp_bang): ditto. * string.c (rb_str_sum): ditto. * string.c (str_modifiable): declare inline. * string.c (str_independent): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_jump.c')
-rw-r--r--eval_jump.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/eval_jump.c b/eval_jump.c
index dbc3794..f3eb30f 100644
--- a/eval_jump.c
+++ b/eval_jump.c
@@ -107,10 +107,12 @@ rb_f_catch(int argc, VALUE *argv)
rb_thread_t *th = GET_THREAD();
rb_control_frame_t *saved_cfp = th->cfp;
- rb_scan_args(argc, argv, "01", &tag);
if (argc == 0) {
tag = rb_obj_alloc(rb_cObject);
}
+ else {
+ rb_scan_args(argc, argv, "01", &tag);
+ }
PUSH_TAG();
th->tag->tag = tag;