Skip to content

Commit

Permalink
Improve warning in Range.new/2 with negative step (#14062)
Browse files Browse the repository at this point in the history
  • Loading branch information
pnezis authored Dec 11, 2024
1 parent 4233693 commit fb288a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/elixir/lib/range.ex
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ defmodule Range do
IO.warn_once(
{__MODULE__, :new},
fn ->
"Range.new/2 has a default step of -1, please call Range.new/3 explicitly passing the step of -1 instead"
"Range.new/2 has a default step of -1 when last < first, please call Range.new/3 explicitly passing the step of -1 instead"
end,
3
)
Expand Down

0 comments on commit fb288a4

Please sign in to comment.