Skip to content

Commit 043593c

Browse files
committed
objspace tweaks to work with latest lib/mri/objspace.rb
1 parent 80cd551 commit 043593c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/mri/objspace.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module ObjectSpace
88
class << self
99
private :_dump
1010
private :_dump_all
11-
private :_dump_shapes if method_defined?(:_dump_shapes)
11+
private :_dump_shapes unless defined?(::TruffleRuby)
1212
end
1313

1414
module_function
@@ -140,5 +140,5 @@ def dump_shapes(output: :file, since: 0)
140140
ret = _dump_shapes(out, since)
141141
return nil if output == :stdout
142142
ret
143-
end
143+
end unless defined?(::TruffleRuby)
144144
end

lib/truffle/objspace.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def _dump(object, output)
120120
end
121121

122122
# Helper method for ObjectSpace.dump_all
123-
def _dump_all(output, full, since)
123+
def _dump_all(output, full, since, shapes)
124124
if Primitive.is_a?(output, String)
125125
objects = []
126126
ObjectSpace.each_object do |object|
@@ -129,7 +129,7 @@ def _dump_all(output, full, since)
129129
objects.join("\n")
130130
else
131131
# IO
132-
output.write _dump_all('', full, since)
132+
output.write _dump_all('', full, since, shapes)
133133
output
134134
end
135135
end

0 commit comments

Comments
 (0)