Skip to content

Commit 56dc92f

Browse files
committed
reference created proxy, so it won't be GCed
1 parent ec8d1b7 commit 56dc92f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/ruby-debug/xml_printer.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,9 @@ def print_at_line(context, file, line)
260260

261261
def print_exception(exception, binding)
262262
print_variables(%w(error), 'exception') do |var|
263-
ExceptionProxy.new(exception)
263+
proxy = ExceptionProxy.new(exception)
264+
InspectCommand.reference_result(proxy)
265+
proxy
264266
end
265267
rescue
266268
print "<processingException type=\"%s\" message=\"%s\"/>",

0 commit comments

Comments
 (0)