diff options
Diffstat (limited to 'spec/ruby/core/file/open_spec.rb')
-rw-r--r-- | spec/ruby/core/file/open_spec.rb | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/spec/ruby/core/file/open_spec.rb b/spec/ruby/core/file/open_spec.rb index 9e98d3d88a..14be5aa32a 100644 --- a/spec/ruby/core/file/open_spec.rb +++ b/spec/ruby/core/file/open_spec.rb @@ -165,23 +165,6 @@ describe "File.open" do File.exist?(@file).should == true end - without_feature :mjit do # [ruby-core:90895] MJIT worker may leave fd open in a forked child. TODO: consider acquiring GVL from MJIT worker. - it "opens a file with a file descriptor d and a block" do - @fh = File.open(@file) - @fh.should be_kind_of(File) - - lambda { - File.open(@fh.fileno) do |fh| - @fd = fh.fileno - @fh.close - end - }.should raise_error(Errno::EBADF) - lambda { File.open(@fd) }.should raise_error(Errno::EBADF) - - File.exist?(@file).should == true - end - end - it "opens a file that no exists when use File::WRONLY mode" do lambda { File.open(@nonexistent, File::WRONLY) }.should raise_error(Errno::ENOENT) end @@ -673,7 +656,7 @@ describe "File.open when passed a file descriptor" do before do @content = "File#open when passed a file descriptor" @name = tmp("file_open_with_fd.txt") - @fd = new_fd @name, fmode("w:utf-8") + @fd = new_fd @name, "w:utf-8" @file = nil end |