summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/stringio/stringio.c4
-rw-r--r--test/stringio/test_stringio.rb4
2 files changed, 7 insertions, 1 deletions
@@ -180,7 +180,9 @@ check_modifiable(struct StringIO *ptr)
else if (OBJ_FROZEN_RAW(ptr->string)) {
rb_raise(rb_eIOError, "not modifiable string");
}
- rb_str_modify(ptr->string);
}
static VALUE
@@ -64,6 +64,10 @@ class TestStringIO < Test::Unit::TestCase
assert_nil io.gets
io.puts "abc"
assert_nil io.string
end
def test_truncate