diff options
| author | ksss <[email protected]> | 2017-03-10 13:26:15 +0900 |
|---|---|---|
| committer | ksss <[email protected]> | 2017-03-10 13:26:15 +0900 |
| commit | 4b3e6cf1691da5a9c87ef4d55004f7ea8b3e383d (patch) | |
| tree | cf02a1e7d40cd92192f2446fdb18441fd994d6ab /test/t/string.rb | |
| parent | c6e5659fec42b1c2ac39292a1ba2ee5852c66846 (diff) | |
| download | mruby-4b3e6cf1691da5a9c87ef4d55004f7ea8b3e383d.tar.gz mruby-4b3e6cf1691da5a9c87ef4d55004f7ea8b3e383d.zip | |
Avoid infinity loop when empty string pattern
Diffstat (limited to 'test/t/string.rb')
| -rw-r--r-- | test/t/string.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/t/string.rb b/test/t/string.rb index 442c95bf7..e39eefb60 100644 --- a/test/t/string.rb +++ b/test/t/string.rb @@ -365,6 +365,7 @@ assert('String#gsub', '15.2.10.5.18') do assert_equal('$$a$$', '##a##'.gsub('##'){|w| '$$' }, 'mruby/mruby#847 another case with block') assert_equal('A', 'a'.gsub('a', 'A')) assert_equal('A', 'a'.gsub('a'){|w| w.capitalize }) + assert_equal(".h.e.l.l.o.", "hello".gsub("", ".")) end assert('String#gsub with backslash') do |
