Skip to content

Commit 070a6d5

Browse files
pnezisjosevalim
authored andcommitted
Improve warning in Range.new/2 with negative step (#14062)
1 parent 9c28fb7 commit 070a6d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/elixir/lib/range.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ defmodule Range do
192192
IO.warn_once(
193193
{__MODULE__, :new},
194194
fn ->
195-
"Range.new/2 has a default step of -1, please call Range.new/3 explicitly passing the step of -1 instead"
195+
"Range.new/2 has a default step of -1 when last < first, please call Range.new/3 explicitly passing the step of -1 instead"
196196
end,
197197
3
198198
)

0 commit comments

Comments
 (0)