summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorTomoyuki Sahara <[email protected]>2017-10-05 21:27:58 +0900
committerGitHub <[email protected]>2017-10-05 21:27:58 +0900
commitf8121953e7970708cf8aa1c4075cf1926b0646ee (patch)
tree644e0e7b3bbe5495697dd31c5722ad37a9a8197b /test
parent04774e5bf26b10150504635e68202a3965e2253b (diff)
parent43795cb1f1d3b15c005532a43f9e47f11acd5476 (diff)
downloadmruby-f8121953e7970708cf8aa1c4075cf1926b0646ee.tar.gz
mruby-f8121953e7970708cf8aa1c4075cf1926b0646ee.zip
Merge pull request #92 from palkan/master
Handle shared/frozen strings in IO#sysread
Diffstat (limited to 'test')
-rw-r--r--test/io.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/io.rb b/test/io.rb
index 5a6dbf146..df646977a 100644
--- a/test/io.rb
+++ b/test/io.rb
@@ -250,6 +250,11 @@ assert('IO.sysopen, IO#sysread') do
io.sysread(10000)
io.sysread(10000)
end
+
+ assert_raise RuntimeError do
+ io.sysread(5, "abcde".freeze)
+ end
+
io.close
assert_equal "", io.sysread(0)
assert_raise(IOError) { io.sysread(1) }