diff --git a/lib/elixir/lib/record.ex b/lib/elixir/lib/record.ex index 23d6243348..41fe17c4ee 100644 --- a/lib/elixir/lib/record.ex +++ b/lib/elixir/lib/record.ex @@ -519,10 +519,10 @@ defmodule Record do defp convert_value(atom) when is_atom(atom), do: { atom, nil } defp convert_value({ atom, other }) when is_atom(atom) and is_function(other), do: - raise ArgumentError, message: "record field #{inspect atom} cannot be a function" + raise ArgumentError, message: "record field value #{inspect atom} cannot be a function" defp convert_value({ atom, other }) when is_atom(atom) and (is_reference(other) or is_pid(other) or is_port(other)), do: - raise ArgumentError, message: "record field #{inspect atom} cannot be a reference, pid or port" + raise ArgumentError, message: "record field value #{inspect atom} cannot be a reference, pid or port" defp convert_value({ atom, _ } = tuple) when is_atom(atom), do: tuple