summaryrefslogtreecommitdiff
path: root/test/-ext-/string/test_cstr.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/-ext-/string/test_cstr.rb')
-rw-r--r--test/-ext-/string/test_cstr.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/-ext-/string/test_cstr.rb b/test/-ext-/string/test_cstr.rb
index 35b5fe59316..2083016db28 100644
--- a/test/-ext-/string/test_cstr.rb
+++ b/test/-ext-/string/test_cstr.rb
@@ -18,6 +18,12 @@ class Test_StringCStr < Test::Unit::TestCase
assert_equal(0, s.cstr_term, Bug4319)
end
+ def test_shared
+ s = Bug::String.new("abcdef")*5
+ s = s.unterminated_substring(0, 29)
+ assert_equal(0, s.cstr_term, Bug4319)
+ end
+
def test_frozen
s0 = Bug::String.new("abcdefgh"*8)