mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* 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
This commit is contained in:
parent
413db1b036
commit
39787ea14d
15 changed files with 106 additions and 54 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue