diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-06-12 07:48:31 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-06-12 07:48:31 +0000 |
commit | 548b5143db2c3d701520671ef1413cf3c39fcedf (patch) | |
tree | f89e9e7746e75343a2886ee50fc23a37f9fe5886 /file.c | |
parent | cfdf994071fac150246d54d65a66ddeba4d53a97 (diff) |
2000-06-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1330,9 +1330,9 @@ rb_file_s_basename(argc, argv) name = STR2CSTR(fname); p = strrchr(name, '/'); if (!p) { - if (NIL_P(fext) || !(f = rmext(p, ext))) + if (NIL_P(fext) || !(f = rmext(name, ext))) return fname; - basename = rb_str_new(p, f); + basename = rb_str_new(name, f); } else { p++; /* skip last `/' */ @@ -1696,7 +1696,6 @@ rb_stat_l(obj) { #ifdef S_ISLNK if (S_ISLNK(get_stat(obj)->st_mode)) return Qtrue; - #endif return Qfalse; } @@ -1931,7 +1930,7 @@ rb_stat_sticky(obj) #ifdef S_ISVTX if (get_stat(obj)->st_mode & S_ISVTX) return Qtrue; #endif - return Qnil; + return Qfalse; } static VALUE rb_mConst; |