Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions stdlib/objspace/0/objspace.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -126,29 +126,6 @@ module ObjectSpace
#
def self?.count_imemo_objects: (?Hash[Symbol, Integer] result_hash) -> Hash[Symbol, Integer]

# <!--
# rdoc-file=ext/objspace/objspace.c
# - ObjectSpace.count_nodes([result_hash]) -> hash
# -->
# Counts nodes for each node type.
#
# This method is only for MRI developers interested in performance and memory
# usage of Ruby programs.
#
# It returns a hash as:
#
# {:NODE_METHOD=>2027, :NODE_FBODY=>1927, :NODE_CFUNC=>1798, ...}
#
# If the optional argument, result_hash, is given, it is overwritten and
# returned. This is intended to avoid probe effect.
#
# Note: The contents of the returned hash is implementation defined. It may be
# changed in future.
#
# This method is only expected to work with C Ruby.
#
def self?.count_nodes: (?Hash[Symbol, Integer] result_hash) -> Hash[Symbol, Integer]

# <!--
# rdoc-file=ext/objspace/objspace.c
# - ObjectSpace.count_objects_size([result_hash]) -> hash
Expand Down
11 changes: 0 additions & 11 deletions test/stdlib/ObjectSpace_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,6 @@ def test_count_imemo_objects
ObjectSpace, :count_imemo_objects, { TOTAL: 0 }
end

def test_count_nodes
ObjectSpace::trace_object_allocations do
assert_send_type "() -> Hash[Symbol, Integer]",
ObjectSpace, :count_nodes
assert_send_type "(Hash[Symbol, Integer]) -> Hash[Symbol, Integer]",
ObjectSpace, :count_nodes, {}
assert_send_type "(Hash[Symbol, Integer]) -> Hash[Symbol, Integer]",
ObjectSpace, :count_nodes, { TOTAL: 0 }
end
end

def test_count_objects_size
assert_send_type "() -> Hash[Symbol, Integer]",
ObjectSpace, :count_objects_size
Expand Down