elixir
elixir copied to clipboard
Deprecate IO.read warning in Newsletter exercise
Hi, test close_log closes the file
contained in Newsletter exercise is reporting the following warning if run with Elixir 1.17.1:
* test close_log closes the file [L#86]warning: IO.read(device, :all) is deprecated, use IO.read(device, :eof) instead
(elixir 1.17.1) lib/io.ex:157: IO.read/2
test/newsletter_test.exs:89: NewsletterTest."test close_log closes the file"/1
(ex_unit 1.17.1) lib/ex_unit/runner.ex:485: ExUnit.Runner.exec_test/2
(stdlib 5.2.3) timer.erl:270: :timer.tc/2
(ex_unit 1.17.1) lib/ex_unit/runner.ex:407: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4
This PR changes IO.read
function call as suggested by the warning.