Skip to content

Commit 22439e5

Browse files
committed
Fix some docs in the Record module
* Removed a doctest that was generating a warning in tests (still not sure why though) * Fixed a repetition in some docs
1 parent 05431f6 commit 22439e5

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lib/elixir/lib/record.ex

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,6 @@ defmodule Record do
144144
iex> tuple = {}
145145
iex> Record.is_record(tuple)
146146
false
147-
iex> other_term = "not a record"
148-
iex> Record.is_record(other_term)
149-
false
150147
151148
"""
152149
defmacro is_record(data) do
@@ -230,10 +227,10 @@ defmodule Record do
230227
231228
## Defining extracted records with anonymous functions in the values
232229
233-
If a record defines an anonymous function in the default values,
234-
an `ArgumentError` will occur if you attempt to create a record with it.
235-
This can happen unintentionally when defining a record after extracting
236-
it from an Erlang library that uses anonymous functions for defaults.
230+
If a record defines an anonymous function in the default values, an
231+
`ArgumentError` will be raised. This can happen unintentionally when defining
232+
a record after extracting it from an Erlang library that uses anonymous
233+
functions for defaults.
237234
238235
Record.defrecord :my_rec, Record.extract(...)
239236
#=> ** (ArgumentError) invalid value for record field fun_field,

0 commit comments

Comments
 (0)