Skip to content

Commit 003a7ad

Browse files
authored
Update Elixir/Erlang versions in CI (#1257)
1 parent b2c0d64 commit 003a7ad

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
PLUG_CRYPTO_2_0: "false"
2323

2424
# Latest-supported Elixir/Erlang pair.
25-
- elixir: "1.17"
26-
otp: "27.0"
25+
- elixir: "1.18"
26+
otp: "27.2"
2727
lint: lint
2828
PLUG_CRYPTO_2_0: "true"
2929

test/plug/debugger_test.exs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ defmodule Plug.DebuggerTest do
5454

5555
get "/bad_match" do
5656
_ = conn
57-
bad_match(:six, :one)
57+
# Code.eval_quoted/2 to avoid typing violations at compile time.
58+
Code.eval_quoted(quote do: unquote(__MODULE__).bad_match(:six, :one))
5859
end
5960

6061
get "/send_and_wrapped" do
@@ -77,14 +78,18 @@ defmodule Plug.DebuggerTest do
7778
raise ActionableError
7879
end
7980

80-
defp returns_nil, do: nil
81+
# Code.eval_quoted/2 to avoid typing violations at compile time.
82+
defp returns_nil do
83+
{result, _bindings} = Code.eval_quoted(quote do: nil)
84+
result
85+
end
8186

8287
defp add_csp(conn, _opts),
8388
do: Plug.Conn.put_resp_header(conn, "content-security-policy", "abcdef")
8489

85-
defp bad_match(:one, :two), do: :ok
86-
defp bad_match(:three, :four), do: :ok
87-
defp bad_match(:five, :six), do: :ok
90+
def bad_match(:one, :two), do: :ok
91+
def bad_match(:three, :four), do: :ok
92+
def bad_match(:five, :six), do: :ok
8893
end
8994

9095
defmodule StyledRouter do

0 commit comments

Comments
 (0)