diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_io.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 4dc7599b99..8eb94e367a 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2981,6 +2981,9 @@ End File.unlink(path) IO.write(path, "foo", encoding: Encoding::UTF_32BE) assert_equal("\0\0\0f\0\0\0o\0\0\0o", File.binread(path)) + assert_raise(TypeError) { + IO.write(path, "foo", Object.new => Object.new) + } ensure t.close! end |