mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 21:49:06 +02:00
* insns.def (concatarray, splatarray): use to_a instead of
to_splat. * insnhelper.ci (caller_setup_args): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6fafbfd63e
commit
2bbffcd6a4
8 changed files with 14 additions and 48 deletions
15
range.c
15
range.c
|
@ -650,19 +650,6 @@ range_to_s(VALUE range)
|
|||
return str;
|
||||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* rng.to_splat => array
|
||||
*
|
||||
* Convert this range object to an array to splat.
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
range_to_splat(VALUE range)
|
||||
{
|
||||
return rb_convert_type(range, T_ARRAY, "Array", "to_a");
|
||||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* rng.inspect => string
|
||||
|
@ -908,12 +895,10 @@ Init_Range(void)
|
|||
rb_define_method(rb_cRange, "max", range_max, 0);
|
||||
rb_define_method(rb_cRange, "to_s", range_to_s, 0);
|
||||
rb_define_method(rb_cRange, "inspect", range_inspect, 0);
|
||||
rb_define_method(rb_cRange, "to_splat", range_to_splat, 0);
|
||||
|
||||
rb_define_method(rb_cRange, "exclude_end?", range_exclude_end_p, 0);
|
||||
|
||||
rb_define_method(rb_cRange, "member?", range_include, 1);
|
||||
rb_define_method(rb_cRange, "include?", range_include, 1);
|
||||
rb_define_method(rb_cRange, "cover?", range_cover, 1);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue