| 1 |
require 'test/unit' |
| 2 |
require '-test-/string' |
| 3 |
|
| 4 |
class Test_RbInternedStr < Test::Unit::TestCase |
| 5 |
def test_interned_str |
| 6 |
src = "a" * 20 |
| 7 |
interned_str = Bug::String.rb_interned_str_dup(src) |
| 8 |
src.clear |
| 9 |
src << "b" * 20 |
| 10 |
assert_equal "a" * 20, interned_str |
| 11 |
end |
| 12 |
end |