aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorNAKAMURA Usaku <usa@ruby-lang.org>2019-12-22 02:36:55 +0900
committerNAKAMURA Usaku <usa@ruby-lang.org>2019-12-22 02:42:09 +0900
commit61aff0cd189e67fa6f2565639ad0128fa33b88fc (patch)
treec1aaf72ca72f4f0e0f98655aef940299b1091ddc /spec
parent29ea228efc5af08a0e91fafe155617f20e22976b (diff)
downloadruby-61aff0cd189e67fa6f2565639ad0128fa33b88fc.tar.gz
Should return "." for File.extname("file.") also on Windows
But not changes another cases, such as "file.rb." [Bug #15267]
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/core/file/extname_spec.rb4
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 == "."