@@ -159,7 +159,7 @@ def self.detailed_message_fallback(exception, options)
159
159
end
160
160
end
161
161
162
- def self . full_message ( exception , options )
162
+ def self . full_message ( exception , ** options )
163
163
highlight = options [ :highlight ]
164
164
highlight = if Primitive . nil? ( highlight )
165
165
Exception . to_tty?
@@ -168,14 +168,13 @@ def self.full_message(exception, options)
168
168
!Primitive . false? ( highlight )
169
169
end
170
170
171
+ options [ :highlight ] = highlight
172
+
171
173
order = options [ :order ]
172
174
order = :top if Primitive . nil? ( order )
173
175
raise ArgumentError , "expected :top or :bottom as order: #{ order } " unless Primitive . equal? ( order , :top ) || Primitive . equal? ( order , :bottom )
174
176
reverse = !Primitive . equal? ( order , :top )
175
177
176
- options = options . dup
177
- options [ :highlight ] = highlight
178
-
179
178
result = '' . b
180
179
bt = exception . backtrace || caller ( 2 )
181
180
if reverse
@@ -290,8 +289,8 @@ def self.to_class_name(val)
290
289
end
291
290
end
292
291
293
- def self . get_formatted_backtrace ( exc )
294
- full_message ( exc , nil , :top )
292
+ def self . get_formatted_backtrace ( exception )
293
+ full_message ( exception , highlight : nil , order : :top )
295
294
end
296
295
297
296
def self . comparison_error_message ( x , y )
0 commit comments