File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -400,23 +400,23 @@ def inspect_with_allocation_control(slice, memory_limit)
400
400
end
401
401
402
402
trace . enable
403
- slice . inspect
404
- trace . disable
403
+ result = slice . inspect
404
+ trace . disable
405
+ result
405
406
rescue MemoryLimitError => e
406
- @printer . print_exception ( e )
407
407
return nil
408
408
end
409
409
410
410
def compact_array_str ( value )
411
411
slice = value [ 0 ..10 ]
412
412
413
- if ( defined? ( JRUBY_VERSION ) || ENV [ 'DEBUGGER_MEMORY_LIMIT' ] . to_i <= 0 )
414
- compact = slice . inspect
415
- else
416
- compact = inspect_with_allocation_control ( slice , ENV [ 'DEBUGGER_MEMORY_LIMIT' ] . to_i )
417
- end
413
+ compact = if ( defined? ( JRUBY_VERSION ) || ENV [ 'DEBUGGER_MEMORY_LIMIT' ] . to_i <= 0 )
414
+ slice . inspect
415
+ else
416
+ compact = inspect_with_allocation_control ( slice , ENV [ 'DEBUGGER_MEMORY_LIMIT' ] . to_i )
417
+ end
418
418
419
- if value . size != slice . size
419
+ if compact && value . size != slice . size
420
420
compact [ 0 ..compact . size -2 ] + ", ...]"
421
421
end
422
422
compact
You can’t perform that action at this time.
0 commit comments