From 548b5143db2c3d701520671ef1413cf3c39fcedf Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 12 Jun 2000 07:48:31 +0000 Subject: 2000-06-12 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index 816277049d..29cea5471d 100644 --- a/file.c +++ b/file.c @@ -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; -- cgit v1.2.3