From 204dc3f39f12b4e2640555306bd1dd4530344277 Mon Sep 17 00:00:00 2001 From: NAKAMURA Usaku Date: Mon, 23 Dec 2019 11:54:25 +0900 Subject: Revert "Should return "." for File.extname("file.") also on Windows" We want to introduce consistency and better compatibility with unixen, but the Windows APIs doues not have consistency fundamentally and we can not found any logical way... This reverts commit 61aff0cd189e67fa6f2565639ad0128fa33b88fc. --- spec/ruby/core/file/extname_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec') diff --git a/spec/ruby/core/file/extname_spec.rb b/spec/ruby/core/file/extname_spec.rb index 79290960fb..e9b53bc24d 100644 --- a/spec/ruby/core/file/extname_spec.rb +++ b/spec/ruby/core/file/extname_spec.rb @@ -23,14 +23,14 @@ describe "File.extname" do end describe "for a filename ending with a dot" do - ruby_version_is ""..."2.7" do + guard -> { platform_is :windows or ruby_version_is ""..."2.7" } do it "returns ''" do File.extname(".foo.").should == "" File.extname("foo.").should == "" end end - ruby_version_is "2.7" do + guard -> { platform_is_not :windows and ruby_version_is "2.7" } do it "returns '.'" do File.extname(".foo.").should == "." File.extname("foo.").should == "." -- cgit v1.2.3