diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-29 16:44:59 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-29 16:44:59 +0000 |
commit | 4bd69735af901266ec21486243fc206030caa6b9 (patch) | |
tree | c6f82a3fd04a6389cfe25cfaa9fb949568e094cd /test/ruby/test_symbol.rb | |
parent | 87f09a8a0deccdac16935dc61c6efa35b014ff8e (diff) | |
parent | 0ad168551355320c091045c0bb6d4b51798bbcc0 (diff) |
add tag v2_3_4v2_3_4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v2_3_4@58214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_symbol.rb')
-rw-r--r-- | test/ruby/test_symbol.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb index ce3b0d652f..34cd886141 100644 --- a/test/ruby/test_symbol.rb +++ b/test/ruby/test_symbol.rb @@ -411,4 +411,14 @@ class TestSymbol < Test::Unit::TestCase assert_equal str, str.to_sym.to_s assert_not_predicate(str, :frozen?, bug11721) end + + def test_hash_nondeterministic + ruby = EnvUtil.rubybin + refute_equal `#{ruby} -e 'puts :foo.hash'`, `#{ruby} -e 'puts :foo.hash'`, + '[ruby-core:80430] [Bug #13376]' + + sym = "dynsym_#{Random.rand(10000)}_#{Time.now}" + refute_equal `#{ruby} -e 'puts #{sym.inspect}.to_sym.hash'`, + `#{ruby} -e 'puts #{sym.inspect}.to_sym.hash'` + end end |