aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-29 04:10:19 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-29 04:10:19 +0000
commitec621fe70f8632d050a2ed17fe471c29470a3083 (patch)
tree511bd09763cab3f483a5a09025e9922ea0132003 /test
parentb67cb7502e222d4255c276bb84fef54612e23d0e (diff)
downloadruby-ec621fe70f8632d050a2ed17fe471c29470a3083.tar.gz
open the path instead of tempfile object
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_io.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 7adeae4700..2b4ad8a669 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -3232,21 +3232,21 @@ End
def test_open_flag
make_tempfile do |t|
- assert_raise(Errno::EEXIST){ open(t, File::WRONLY|File::CREAT, flags: File::EXCL){} }
- assert_raise(Errno::EEXIST){ open(t, 'w', flags: File::EXCL){} }
- assert_raise(Errno::EEXIST){ open(t, mode: 'w', flags: File::EXCL){} }
+ assert_raise(Errno::EEXIST){ open(t.path, File::WRONLY|File::CREAT, flags: File::EXCL){} }
+ assert_raise(Errno::EEXIST){ open(t.path, 'w', flags: File::EXCL){} }
+ assert_raise(Errno::EEXIST){ open(t.path, mode: 'w', flags: File::EXCL){} }
end
end
def test_open_flag_binar
make_tempfile do |t|
- open(t, File::RDONLY, flags: File::BINARY) do |f|
+ open(t.path, File::RDONLY, flags: File::BINARY) do |f|
assert_equal true, f.binmode
end
- open(t, 'r', flags: File::BINARY) do |f|
+ open(t.path, 'r', flags: File::BINARY) do |f|
assert_equal true, f.binmode
end
- open(t, mode: 'r', flags: File::BINARY) do |f|
+ open(t.path, mode: 'r', flags: File::BINARY) do |f|
assert_equal true, f.binmode
end
end