summaryrefslogtreecommitdiff
path: root/test/ruby/test_io_buffer.rb
diff options
context:
space:
mode:
authorCharles Oliver Nutter <[email protected]>2023-10-20 23:30:40 -0500
committerGitHub <[email protected]>2023-10-21 17:30:40 +1300
commit55d954721e25ada90482f6d3f751a12fc982620b (patch)
tree09582e517deafb57dc2479ad99245f45c63f6d27 /test/ruby/test_io_buffer.rb
parent0e62802c3bdc2167b1c8e5f9db014f1e421f2c62 (diff)
Raise TypeError for bad IO::Buffer.map argument (#8728)
* Raise TypeError when IO::Buffer.map argument is neither IO nor implements #fileno * Use UNREACHABLE_CODE Co-authored-by: Nobuyoshi Nakada <[email protected]> * Use macro for undef check Co-authored-by: Nobuyoshi Nakada <[email protected]> --------- Co-authored-by: Nobuyoshi Nakada <[email protected]>
Diffstat (limited to 'test/ruby/test_io_buffer.rb')
-rw-r--r--test/ruby/test_io_buffer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_io_buffer.rb b/test/ruby/test_io_buffer.rb
index 1b4a09dd20..dea8388d7d 100644
--- a/test/ruby/test_io_buffer.rb
+++ b/test/ruby/test_io_buffer.rb
@@ -80,7 +80,7 @@ class TestIOBuffer < Test::Unit::TestCase
end
def test_file_mapped_invalid
- assert_raise NoMethodError do
+ assert_raise TypeError do
IO::Buffer.map("foobar")
end
end