From 61aff0cd189e67fa6f2565639ad0128fa33b88fc Mon Sep 17 00:00:00 2001 From: NAKAMURA Usaku Date: Sun, 22 Dec 2019 02:36:55 +0900 Subject: Should return "." for File.extname("file.") also on Windows But not changes another cases, such as "file.rb." [Bug #15267] --- test/ruby/test_path.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'test/ruby/test_path.rb') diff --git a/test/ruby/test_path.rb b/test/ruby/test_path.rb index b35e942a2a..64111ee805 100644 --- a/test/ruby/test_path.rb +++ b/test/ruby/test_path.rb @@ -239,11 +239,7 @@ class TestPath < Test::Unit::TestCase ext = '.' end assert_equal(ext, File.extname('a.rb.')) - if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM - # trailing spaces and dots are ignored on NTFS. - ext = '' - end - assert_equal(ext, File.extname('a.')) + assert_equal('.', File.extname('a.')) assert_equal('', File.extname('.x')) assert_equal('', File.extname('..x')) end -- cgit v1.2.3