diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-23 17:06:55 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-23 17:06:55 +0000 |
commit | 9942c6ed13910504726ac688a205313b44ed3895 (patch) | |
tree | f33268bec64b1e9cc8b89206923dc950193d0457 /file.c | |
parent | 8211f8f8afe664a96b8c1473037463293a48a75e (diff) |
* 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
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1758,6 +1758,10 @@ rb_file_s_expand_path(argc, argv) VALUE *argv; { VALUE fname, dname; + + if (argc == 1) { + return rb_file_expand_path(argv[0], Qnil); + } rb_scan_args(argc, argv, "11", &fname, &dname); return rb_file_expand_path(fname, dname); |