Since Elixir v1.16 negative slices (steps) to String.slice/2 have been deprecated and throws a warning for each call when running mix coveralls.cobertura.
Example warning:
warning: negative steps are not supported in String.slice/2, pass 31..-1//1 instead
This PR removes the warning by using explicit steps as the warning message recommends. However since this library supports also v1.11, which does not support explicit steps yet, this PR conditionally calls Range.new/3 instead of using x..y//step. Otherwise we would get a syntax error during compilation on v.1.11.
Let me know if there is anything else that needs to be done in this PR.
Since Elixir v1.16 negative slices (steps) to
String.slice/2
have been deprecated and throws a warning for each call when runningmix coveralls.cobertura
.Example warning:
This PR removes the warning by using explicit steps as the warning message recommends. However since this library supports also v1.11, which does not support explicit steps yet, this PR conditionally calls
Range.new/3
instead of usingx..y//step
. Otherwise we would get a syntax error during compilation on v.1.11.Let me know if there is anything else that needs to be done in this PR.