summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-02 02:32:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-02 02:32:53 +0000
commitd1c0375526e765a3f86450173ee287cb1a233441 (patch)
tree1f1e1019eea5d90616ceb324954521687d2eda3e /test
parentd42e0ea844b1adbee39bcb8c2266468122670094 (diff)
test_io.rb: defer f_type
* test/ruby/test_io.rb (test_seek, test_seek_symwhence): defer File::Statfs#type call which may not be implemented, to mitigate errors on platforms where SEEK_DATA is available but f_type in struct statfs is not. [ruby-dev:48154] [Bug #9789] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_io.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index d2abd9e97d..5ed2ddd13b 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1715,7 +1715,7 @@ class TestIO < Test::Unit::TestCase
open(t.path) { |f|
break unless can_seek_data(f)
assert_equal("foo\n", f.gets)
- assert_nothing_raised("cannot SEEK_DATA on FS(0x%X)" % f.statfs.type) do
+ assert_nothing_raised(proc {"cannot SEEK_DATA on FS(0x%X)" % f.statfs.type}) do
f.seek(0, IO::SEEK_DATA)
end
assert_equal("foo\nbar\nbaz\n", f.read)
@@ -1765,7 +1765,7 @@ class TestIO < Test::Unit::TestCase
open(t.path) { |f|
break unless can_seek_data(f)
assert_equal("foo\n", f.gets)
- assert_nothing_raised("cannot SEEK_DATA on FS(0x%X)" % f.statfs.type) do
+ assert_nothing_raised(proc {"cannot SEEK_DATA on FS(0x%X)" % f.statfs.type}) do
f.seek(0, :DATA)
end
assert_equal("foo\nbar\nbaz\n", f.read)