We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19965c7 commit 64bfabaCopy full SHA for 64bfaba
core/file/shared/unlink.rb
@@ -47,4 +47,17 @@
47
it "accepts an object that has a #to_path method" do
48
File.send(@method, mock_to_path(@file1)).should == 1
49
end
50
+
51
+ ruby_version_is "2.3" do
52
+ platform_is :windows do
53
+ it "allows deleting an open file with File::SHARE_DELETE" do
54
+ path = tmp("share_delete.txt")
55
+ File.open(path, mode: File::CREAT | File::WRONLY | File::BINARY | File::SHARE_DELETE) do |f|
56
+ File.exist?(path).should be_true
57
+ File.send(@method, path)
58
+ File.exist?(path).should be_false
59
+ end
60
61
62
63
0 commit comments