diff options
author | NAKAMURA Usaku <usa@ruby-lang.org> | 2019-12-22 02:36:55 +0900 |
---|---|---|
committer | NAKAMURA Usaku <usa@ruby-lang.org> | 2019-12-22 02:42:09 +0900 |
commit | 61aff0cd189e67fa6f2565639ad0128fa33b88fc (patch) | |
tree | c1aaf72ca72f4f0e0f98655aef940299b1091ddc /spec/ruby | |
parent | 29ea228efc5af08a0e91fafe155617f20e22976b (diff) |
Should return "." for File.extname("file.") also on Windows
But not changes another cases, such as "file.rb."
[Bug #15267]
Diffstat (limited to 'spec/ruby')
-rw-r--r-- | spec/ruby/core/file/extname_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 == "." |