summaryrefslogtreecommitdiff
path: root/test/ruby/test_sprintf.rb
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2024-11-10 13:04:43 +0900
committernagachika <nagachika@ruby-lang.org>2024-11-10 13:04:43 +0900
commitee3428aa0e3a11ed1574b7d99222f6f08737f818 (patch)
treea468a4f8b6425c2635794d4af67841fd9dabead0 /test/ruby/test_sprintf.rb
parent288e24b73ab20100b63ae7d30fb06a7d8a19de6e (diff)
merge revision(s) 56ecc243e230e8e99761ec0ffc5116601f094bb0: [Backport #20868]
[Bug #20868] Fix Method#hash to not change after compaction The hash value of a Method must remain constant after a compaction, otherwise it may not work as the key in a hash table. For example: def a; end # Need this method here because otherwise the iseq may be on the C stack # which would get pinned and not move during compaction def get_hash method(:a).hash end puts get_hash # => 2993401401091578131 GC.verify_compaction_references(expand_heap: true, toward: :empty) puts get_hash # => -2162775864511574135
Diffstat (limited to 'test/ruby/test_sprintf.rb')
0 files changed, 0 insertions, 0 deletions