From 950508e9b73543c4ec1846b3b7887613e9defc20 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 30 May 2014 02:33:38 +0000 Subject: 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 --- test/ruby/test_string.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 6581796a94..0fd49d232d 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -894,6 +894,8 @@ class TestString < Test::Unit::TestCase assert_not_equal(S("a").hash, S("a\0").hash, bug4104) bug9172 = '[ruby-core:58658] [Bug #9172]' assert_not_equal(S("sub-setter").hash, S("discover").hash, bug9172) + bug9882 = '[ruby-core:62842] [Bug #9882]' + assert_equal(S(bug9882).hash, S("\u{30c6 30b9 30c8 2019}#{bug9882}")[4..-1].hash, bug9882) end def test_hash_random -- cgit v1.2.3