@@ -252,14 +252,8 @@ def inspection_value_proc
252252 attributes [ :inspection_value_proc ] || self . class . inspection_value_proc
253253 end
254254
255- def to_inspection_hash ( options : { } , _h : { } . with_indifferent_access , _depth : 0 )
256- backtrace_key = options [ :backtrace_key ] || :backtrace
257- _h . merge! (
258- type : self . class . name , status : status ,
259- http_status : http_status , message : message ,
260- instance_variables : { } . with_indifferent_access
261- )
262- digest_backtrace # for @digest_backtrace
255+ def to_inspection_ivars
256+ _h = { instance_variables : { } } . with_indifferent_access
263257 instance_variables . sort . each do |var |
264258 if inspection_vars . include? ( var )
265259 val = instance_variable_get ( var )
@@ -272,6 +266,18 @@ def to_inspection_hash(options: {}, _h: {}.with_indifferent_access, _depth: 0)
272266 _h [ :instance_variables ] [ var ] = self . class . inspection_value_simple ( val )
273267 end
274268 end
269+ _h
270+ end
271+
272+ def to_inspection_hash ( options : { } , _h : { } . with_indifferent_access , _depth : 0 )
273+ backtrace_key = options [ :backtrace_key ] || :backtrace
274+ _h . merge! (
275+ type : self . class . name , status : status ,
276+ http_status : http_status , message : message ,
277+ instance_variables : { } . with_indifferent_access
278+ )
279+ digest_backtrace # for @digest_backtrace
280+ _h . merge! ( to_inspection_ivars )
275281 if backtrace . present?
276282 if respond_to? ( :cleaned_backtrace )
277283 if ( bt = cleaned_backtrace ( options ) )
0 commit comments