Skip to content

Commit 1c7fc86

Browse files
jonatankloskojosevalim
authored andcommitted
Make :source_path in docs chunk a charlist (#14071)
1 parent 617dc72 commit 1c7fc86

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/elixir/src/elixir_erl.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ docs_chunk(Map, Set, Module, Anno, Def, Defmacro, Types, Callbacks, ChunkOpts) -
526526
TypeDocs = get_type_docs(Set, Types),
527527

528528
ModuleMeta = ModuleDocMeta#{
529-
source_path => File,
529+
source_path => elixir_utils:characters_to_list(File),
530530
source_annos => [Anno],
531531
behaviours => [Mod || {behaviour, Mod} <- Attributes]
532532
},

lib/elixir/test/elixir/kernel/docs_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ defmodule Kernel.DocsTest do
255255

256256
assert module_doc == "Module doc"
257257

258-
file = __ENV__.file
258+
file = String.to_charlist(__ENV__.file)
259259

260260
source_annos = [:erl_anno.new({line + 3, 19})]
261261

0 commit comments

Comments
 (0)