diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-13 00:42:03 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-13 00:42:03 +0900 |
| commit | 2067f1f9ffc77b4110d73c4960d098adb3a01470 (patch) | |
| tree | 620ce5b642703a865bc396721f02ec3e0d37c5c0 /test | |
| parent | 2ed7089546e8d4f41e32bd9959ef75c894c3e4fd (diff) | |
| parent | be3e36cb0508713d651026597d7320bc9ce8337a (diff) | |
| download | mruby-2067f1f9ffc77b4110d73c4960d098adb3a01470.tar.gz mruby-2067f1f9ffc77b4110d73c4960d098adb3a01470.zip | |
Merge branch 'master' of github.com:mruby/mruby
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/string.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/t/string.rb b/test/t/string.rb index 5ecb51530..00e98f671 100644 --- a/test/t/string.rb +++ b/test/t/string.rb @@ -320,6 +320,13 @@ assert('String#replace', '15.2.10.5.28') do b.replace(c); c.replace(b); assert_equal c, b + + # shared string + s = "foo" * 100 + a = s[10, 90] # create shared string + assert_equal("", s.replace("")) # clear + assert_equal("", s) # s is cleared + assert_not_equal("", a) # a should not be affected end assert('String#reverse', '15.2.10.5.29') do |
