test_beginendblock.rb: avoid leaking threads

* test/ruby/test_beginendblock.rb (test_endblock_raise): not only
  kill, but also wait the end.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
string.c: reset code range

* string.c (rb_str_substr): need to reset code range for shared
  string too, not only copied string.
  [ruby-core:62842] [Bug #9882]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e