aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorNAKAMURA Usaku <usa@ruby-lang.org>2019-12-23 11:54:25 +0900
committerNAKAMURA Usaku <usa@ruby-lang.org>2019-12-23 11:54:25 +0900
commit204dc3f39f12b4e2640555306bd1dd4530344277 (patch)
tree1532d86db7caeb9b6f5b74b3602918ceb04e11a4 /spec
parent048f797bf019cdf303d70494fba63d4a4e606462 (diff)
downloadruby-204dc3f39f12b4e2640555306bd1dd4530344277.tar.gz
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.
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 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 == "."