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] --- spec/ruby/core/file/extname_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/ruby/core') diff --git a/spec/ruby/core/file/extname_spec.rb b/spec/ruby/core/file/extname_spec.rb index e9b53bc24d..79290960fb 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 - guard -> { platform_is :windows or ruby_version_is ""..."2.7" } do + ruby_version_is ""..."2.7" do it "returns ''" do File.extname(".foo.").should == "" File.extname("foo.").should == "" end end - guard -> { platform_is_not :windows and ruby_version_is "2.7" } do + ruby_version_is "2.7" do it "returns '.'" do File.extname(".foo.").should == "." File.extname("foo.").should == "." -- cgit v1.2.3