From 281a9df6f796f9b5aa2234a7281adf41cdd7677e Mon Sep 17 00:00:00 2001 From: Art Kay Date: Fri, 30 Aug 2024 16:53:08 -0400 Subject: [PATCH] Fix typos in a test and in a doc (#13799) --- lib/elixir/pages/anti-patterns/macro-anti-patterns.md | 2 +- lib/iex/test/iex/pry_test.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/elixir/pages/anti-patterns/macro-anti-patterns.md b/lib/elixir/pages/anti-patterns/macro-anti-patterns.md index cffaf180669..1327e44ca49 100644 --- a/lib/elixir/pages/anti-patterns/macro-anti-patterns.md +++ b/lib/elixir/pages/anti-patterns/macro-anti-patterns.md @@ -67,7 +67,7 @@ To address this anti-pattern, a macro can expand literals within the context the end ``` -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. +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. 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. diff --git a/lib/iex/test/iex/pry_test.exs b/lib/iex/test/iex/pry_test.exs index 3558f4c8996..e4ba1c20ccb 100644 --- a/lib/iex/test/iex/pry_test.exs +++ b/lib/iex/test/iex/pry_test.exs @@ -195,7 +195,7 @@ defmodule IEx.PryTest do Macro.to_string({:__block__, meta, tail}) end - test "one expresion, one line" do + test "one expression, one line" do assert annotate_quoted(""" x = 123 y = 456