summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/elixir/lib/kernel.ex2
-rw-r--r--lib/elixir/lib/range.ex4
-rw-r--r--lib/elixir/test/elixir/range_test.exs4
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/elixir/lib/kernel.ex b/lib/elixir/lib/kernel.ex
index 38af77415..4567bf877 100644
--- a/lib/elixir/lib/kernel.ex
+++ b/lib/elixir/lib/kernel.ex
@@ -2448,7 +2448,7 @@ defmodule Kernel do
is_list(first) or is_list(last) do
true ->
raise ArgumentError,
- "ranges (first .. last) expect both sides to be integers, " <>
+ "ranges (first..last) expect both sides to be integers, " <>
"got: #{Macro.to_string({:.., [], [first, last]})}"
false ->
{:%{}, [], [__struct__: Elixir.Range, first: first, last: last]}
diff --git a/lib/elixir/lib/range.ex b/lib/elixir/lib/range.ex
index 4d4a7cf68..1c40418cd 100644
--- a/lib/elixir/lib/range.ex
+++ b/lib/elixir/lib/range.ex
@@ -15,7 +15,7 @@ defmodule Range do
iex> range = 1..3
1..3
- iex> first .. last = range
+ iex> first..last = range
iex> first
1
iex> last
@@ -108,7 +108,7 @@ defimpl Enumerable, for: Range do
defp validate_range!(first, last) do
raise ArgumentError,
- "ranges (first .. last) expect both sides to be integers, " <>
+ "ranges (first..last) expect both sides to be integers, " <>
"got: #{Macro.to_string({:.., [], [first, last]})}"
end
end
diff --git a/lib/elixir/test/elixir/range_test.exs b/lib/elixir/test/elixir/range_test.exs
index d25883ba3..4f8a4ba5f 100644
--- a/lib/elixir/test/elixir/range_test.exs
+++ b/lib/elixir/test/elixir/range_test.exs
@@ -42,14 +42,14 @@ defmodule RangeTest do
test "integer only" do
x = 1.0
y = 3.0
- message = "ranges (first .. last) expect both sides to be integers, got: 1.0..3.0"
+ message = "ranges (first..last) expect both sides to be integers, got: 1.0..3.0"
assert_raise ArgumentError, message, fn ->
Enum.map(x..y, &(&1 * 2))
end
first = []
last = []
- message = "ranges (first .. last) expect both sides to be integers, got: []..[]"
+ message = "ranges (first..last) expect both sides to be integers, got: []..[]"
assert_raise ArgumentError, message, fn ->
first..last
Enum.map(first..last, &(&1))