summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEksperimental <eksperimental@users.noreply.github.com>2018-07-11 15:04:08 +0700
committerJosé Valim <jose.valim@gmail.com>2018-07-11 10:04:08 +0200
commitec0435b84f19eff70cbf8ea29ae0c167212f6e2e (patch)
tree51d011fe605873287f8c95ebbf96fd2d6414e8b9
parent94348db5f4c57ef27f28bf2048e994d9892730f7 (diff)
downloadelixir-ec0435b84f19eff70cbf8ea29ae0c167212f6e2e.tar.gz
Change wording in error giving options (#7875)
-rw-r--r--lib/elixir/lib/gen_event.ex2
-rw-r--r--lib/elixir/lib/gen_server.ex2
-rw-r--r--lib/elixir/lib/supervisor.ex6
-rw-r--r--lib/elixir/test/elixir/gen_server_test.exs6
-rw-r--r--lib/elixir/test/elixir/supervisor_test.exs6
5 files changed, 11 insertions, 11 deletions
diff --git a/lib/elixir/lib/gen_event.ex b/lib/elixir/lib/gen_event.ex
index 6e2bd02ad..513cd2322 100644
--- a/lib/elixir/lib/gen_event.ex
+++ b/lib/elixir/lib/gen_event.ex
@@ -182,7 +182,7 @@ defmodule GenEvent do
other ->
raise ArgumentError, """
- expected :name option to be one of:
+ expected :name option to be one of the following:
* nil
* atom
diff --git a/lib/elixir/lib/gen_server.ex b/lib/elixir/lib/gen_server.ex
index 5310107c8..ad340165f 100644
--- a/lib/elixir/lib/gen_server.ex
+++ b/lib/elixir/lib/gen_server.ex
@@ -843,7 +843,7 @@ defmodule GenServer do
{other, _} ->
raise ArgumentError, """
- expected :name option to be one of:
+ expected :name option to be one of the following:
* nil
* atom
diff --git a/lib/elixir/lib/supervisor.ex b/lib/elixir/lib/supervisor.ex
index 6772fc179..aadab8a6f 100644
--- a/lib/elixir/lib/supervisor.ex
+++ b/lib/elixir/lib/supervisor.ex
@@ -275,7 +275,7 @@ defmodule Supervisor do
with other developers and they can add it directly to their supervision tree
without worrying about the low-level details of the worker.
- Overall, the child specification can be one of:
+ Overall, the child specification can be one of the following:
* a map representing the child specification itself - as outlined in the
"Child specification" section
@@ -654,7 +654,7 @@ defmodule Supervisor do
defp init_child(other) do
raise ArgumentError, """
- supervisors expect each child to be one of:
+ supervisors expect each child to be one of the following:
* a module
* a {module, arg} tuple
@@ -788,7 +788,7 @@ defmodule Supervisor do
other ->
raise ArgumentError, """
- expected :name option to be one of:
+ expected :name option to be one of the following:
* nil
* atom
diff --git a/lib/elixir/test/elixir/gen_server_test.exs b/lib/elixir/test/elixir/gen_server_test.exs
index 47db7755e..f9776733a 100644
--- a/lib/elixir/test/elixir/gen_server_test.exs
+++ b/lib/elixir/test/elixir/gen_server_test.exs
@@ -63,15 +63,15 @@ defmodule GenServerTest do
end
test "start_link/3" do
- assert_raise ArgumentError, ~r"expected :name option to be one of:", fn ->
+ assert_raise ArgumentError, ~r"expected :name option to be one of the following:", fn ->
GenServer.start_link(Stack, [:hello], name: "my_gen_server_name")
end
- assert_raise ArgumentError, ~r"expected :name option to be one of:", fn ->
+ assert_raise ArgumentError, ~r"expected :name option to be one of the following:", fn ->
GenServer.start_link(Stack, [:hello], name: {:invalid_tuple, "my_gen_server_name"})
end
- assert_raise ArgumentError, ~r"expected :name option to be one of:", fn ->
+ assert_raise ArgumentError, ~r"expected :name option to be one of the following:", fn ->
GenServer.start_link(Stack, [:hello], name: {:via, "Via", "my_gen_server_name"})
end
diff --git a/lib/elixir/test/elixir/supervisor_test.exs b/lib/elixir/test/elixir/supervisor_test.exs
index 2141d9f91..445a783bd 100644
--- a/lib/elixir/test/elixir/supervisor_test.exs
+++ b/lib/elixir/test/elixir/supervisor_test.exs
@@ -166,17 +166,17 @@ defmodule SupervisorTest do
assert GenServer.call(:dyn_stack, :pop) == :hello
Supervisor.stop(pid)
- assert_raise ArgumentError, ~r"expected :name option to be one of:", fn ->
+ assert_raise ArgumentError, ~r"expected :name option to be one of the following:", fn ->
name = "my_gen_server_name"
Supervisor.start_link(children, name: name, strategy: :one_for_one)
end
- assert_raise ArgumentError, ~r"expected :name option to be one of:", fn ->
+ assert_raise ArgumentError, ~r"expected :name option to be one of the following:", fn ->
name = {:invalid_tuple, "my_gen_server_name"}
Supervisor.start_link(children, name: name, strategy: :one_for_one)
end
- assert_raise ArgumentError, ~r"expected :name option to be one of:", fn ->
+ assert_raise ArgumentError, ~r"expected :name option to be one of the following:", fn ->
name = {:via, "Via", "my_gen_server_name"}
Supervisor.start_link(children, name: name, strategy: :one_for_one)
end