summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-02-20 20:07:07 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2024-02-20 20:14:37 +0900
commite3917fc7da2c4dfbf0144ad988ec1047fd290642 (patch)
treeb72766ccc8b18e165292df59f66b33bdc2c0fa1f /test/ruby
parent7cb8fd780011a43eebf33a5aa6da1262a5c52307 (diff)
Remove no longer used methods
`find_object_in_recycled_slot` and `memory_location` have not been used since commit:b99833baec2e567e38758f4fd017c90c7ce57d75.
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_gc_compact.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb
index f8ebba84b8..5049af1ab4 100644
--- a/test/ruby/test_gc_compact.rb
+++ b/test/ruby/test_gc_compact.rb
@@ -1,6 +1,5 @@
# frozen_string_literal: true
require 'test/unit'
-require 'fiddle'
require 'etc'
if RUBY_PLATFORM =~ /s390x/
@@ -130,10 +129,6 @@ class TestGCCompact < Test::Unit::TestCase
refute_predicate compact_stats[:moved], :empty?
end
- def memory_location(obj)
- (Fiddle.dlwrap(obj) >> 1)
- end
-
def big_list(level = 10)
if level > 0
big_list(level - 1)
@@ -146,21 +141,6 @@ class TestGCCompact < Test::Unit::TestCase
end
end
- # Find an object that's allocated in a slot that had a previous
- # tenant, and that tenant moved and is still alive
- def find_object_in_recycled_slot(addresses)
- new_object = nil
-
- 100_000.times do
- new_object = Object.new
- if addresses.index memory_location(new_object)
- break
- end
- end
-
- new_object
- end
-
def test_complex_hash_keys
list_of_objects = big_list
hash = list_of_objects.hash