From 4c255c77399789324e5c4d72787d87ac1fcc49dd Mon Sep 17 00:00:00 2001 From: Vladimir Dementyev Date: Thu, 5 Oct 2017 14:40:43 +0300 Subject: Handle shared/frozen strings in IO#sysread See https://github.com/mruby/mruby/commit/7edbe428caca6814841195a3f2720745cf04353e --- test/io.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') 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) } -- cgit v1.2.3