* file.c (rb_file_s_expand_path): avoid calling rb_scan_args() for
apparent cases. [ruby-talk:79748] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8211f8f8af
commit
9942c6ed13
@ -3,6 +3,11 @@ Sun Aug 24 01:02:48 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|||||||
* file.c (file_expand_path): performance improvement.
|
* file.c (file_expand_path): performance improvement.
|
||||||
[ruby-talk:79748]
|
[ruby-talk:79748]
|
||||||
|
|
||||||
|
Sat Aug 23 23:41:16 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* file.c (rb_file_s_expand_path): avoid calling rb_scan_args() for
|
||||||
|
apparent cases. [ruby-talk:79748]
|
||||||
|
|
||||||
Sat Aug 23 18:56:53 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Aug 23 18:56:53 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/nkf/nkf.c (rb_nkf_putchar): should use rb_str_resize() to just
|
* ext/nkf/nkf.c (rb_nkf_putchar): should use rb_str_resize() to just
|
||||||
|
7
eval.c
7
eval.c
@ -4256,16 +4256,13 @@ VALUE
|
|||||||
rb_yield_splat(values)
|
rb_yield_splat(values)
|
||||||
VALUE values;
|
VALUE values;
|
||||||
{
|
{
|
||||||
VALUE tmp;
|
|
||||||
int avalue = Qfalse;
|
int avalue = Qfalse;
|
||||||
|
|
||||||
tmp = rb_check_array_type(values);
|
if (TYPE(values) == T_ARRAY) {
|
||||||
if (!NIL_P(tmp)) {
|
if (RARRAY(values)->len == 0) {
|
||||||
if (RARRAY(tmp)->len == 0) {
|
|
||||||
values = Qundef;
|
values = Qundef;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
values = tmp;
|
|
||||||
avalue = Qtrue;
|
avalue = Qtrue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
file.c
4
file.c
@ -1758,6 +1758,10 @@ rb_file_s_expand_path(argc, argv)
|
|||||||
VALUE *argv;
|
VALUE *argv;
|
||||||
{
|
{
|
||||||
VALUE fname, dname;
|
VALUE fname, dname;
|
||||||
|
|
||||||
|
if (argc == 1) {
|
||||||
|
return rb_file_expand_path(argv[0], Qnil);
|
||||||
|
}
|
||||||
rb_scan_args(argc, argv, "11", &fname, &dname);
|
rb_scan_args(argc, argv, "11", &fname, &dname);
|
||||||
|
|
||||||
return rb_file_expand_path(fname, dname);
|
return rb_file_expand_path(fname, dname);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user