summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-18 03:35:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-18 03:35:34 +0000
commit24b0a7f965b72162b5cd164f36b4fe4c3532bb3d (patch)
tree3c3a2ed2ad5860ffbdd88e7b6830356cdf87624f /file.c
parent19037e372977c79896471e7ca0abf0967d800b05 (diff)
downloadruby-24b0a7f965b72162b5cd164f36b4fe4c3532bb3d.tar.gz
ruby-24b0a7f965b72162b5cd164f36b4fe4c3532bb3d.tar.xz
ruby-24b0a7f965b72162b5cd164f36b4fe4c3532bb3d.zip
* file.c (rb_file_s_extname): fix for spaces before extention.
[ruby-dev:38044] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index c89cd855b..69c0c681a 100644
--- a/file.c
+++ b/file.c
@@ -3185,7 +3185,7 @@ rb_file_s_extname(VALUE klass, VALUE fname)
p = last;
break;
}
- if (*last == '.') e = dot;
+ if (*last == '.' || dot > last) e = dot;
continue;
#else
e = p; /* get the last dot of the last component */