class ActionDispatch::ExceptionWrapper

def causes_for(exception)

def causes_for(exception)
  return enum_for(__method__, exception) unless block_given?
  yield exception while exception = exception.cause
end