lib/metaractor/failure_output.rb in metaractor-3.3.0 vs lib/metaractor/failure_output.rb in metaractor-3.3.2

- old
+ new

@@ -1,9 +1,9 @@ module Metaractor module FailureOutput def to_s - str = '' + str = "" if !context.errors.empty? str << "Errors:\n" str << Metaractor.format_hash(context.errors.to_h) str << "\n\n" @@ -17,10 +17,10 @@ end str << "\n" end str << "Context:\n" - str << Metaractor.format_hash(context.to_h.reject{|k,_| k == :errors}) + str << Metaractor.format_hash(context.to_h.except(:errors)) str end end end