diff options
author | Nobuyoshi Nakada <[email protected]> | 2023-12-17 00:30:00 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2023-12-17 00:30:00 +0900 |
commit | ab7f54688b495b3218843e58992b713c3b28011f (patch) | |
tree | e5b9e1980d3ea913430ec79c0ada2c9001a5fe01 /test/ruby/test_string.rb | |
parent | 2f595c744e10f7d5222c477efd50fe168fe9d47e (diff) |
Stir the hash value more with encoding index
Diffstat (limited to 'test/ruby/test_string.rb')
-rw-r--r-- | test/ruby/test_string.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 4d5dea7328..ae392b2da6 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -1345,6 +1345,8 @@ CODE bug9172 = '[ruby-core:58658] [Bug #9172]' assert_not_equal(S("sub-setter").hash, S("discover").hash, bug9172) assert_equal(S("").hash, S("".encode(Encoding::UTF_32BE)).hash) + h1, h2 = ["\x80", "\x81"].map {|c| c.b.hash ^ c.hash} + assert_not_equal(h1, h2) end def test_hex |