Skip to content

Commit 281a9df

Browse files
authored
Fix typos in a test and in a doc (#13799)
1 parent e1b265a commit 281a9df

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/elixir/pages/anti-patterns/macro-anti-patterns.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ To address this anti-pattern, a macro can expand literals within the context the
6767
end
6868
```
6969

70-
In the example above, since `mod` is used only within the `call/2` function, we prematuraly expand module reference as if it was inside the `call/2` function. Now `MyApp.Authentication` is only a runtime dependency of `MyApp`, no longer a compile-time one.
70+
In the example above, since `mod` is used only within the `call/2` function, we prematurely expand module reference as if it was inside the `call/2` function. Now `MyApp.Authentication` is only a runtime dependency of `MyApp`, no longer a compile-time one.
7171

7272
Note, however, the above must only be done if your macros do not attempt to invoke any function, access any struct, or any other metadata of the module at compile-time. If you interact with the module given to a macro anywhere outside of definition of a function, then you effectively have a compile-time dependency. And, even though you generally want to avoid them, it is not always possible.
7373

lib/iex/test/iex/pry_test.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ defmodule IEx.PryTest do
195195
Macro.to_string({:__block__, meta, tail})
196196
end
197197

198-
test "one expresion, one line" do
198+
test "one expression, one line" do
199199
assert annotate_quoted("""
200200
x = 123
201201
y = 456

0 commit comments

Comments
 (0)