Skip to content

Commit aebc7e2

Browse files
amatalaiJosé Valim
authored andcommitted
Fixed indentation in StringIO.open/3 examples (#7920)
Signed-off-by: José Valim <[email protected]>
1 parent f0aeb71 commit aebc7e2

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

lib/elixir/lib/string_io.ex

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ defmodule StringIO do
3131
3232
## Examples
3333
34-
iex> StringIO.open("foo", [], fn(pid) ->
35-
...> input = IO.gets(pid, ">")
36-
...> IO.write(pid, "The input was #{input}")
37-
...> StringIO.contents(pid)
38-
...> end)
39-
{:ok, {"", "The input was foo"}}
40-
41-
iex> StringIO.open("foo", [capture_prompt: true], fn(pid) ->
42-
...> input = IO.gets(pid, ">")
43-
...> IO.write(pid, "The input was #{input}")
44-
...> StringIO.contents(pid)
45-
...> end)
46-
{:ok, {"", ">The input was foo"}}
34+
iex> StringIO.open("foo", [], fn(pid) ->
35+
...> input = IO.gets(pid, ">")
36+
...> IO.write(pid, "The input was #{input}")
37+
...> StringIO.contents(pid)
38+
...> end)
39+
{:ok, {"", "The input was foo"}}
40+
41+
iex> StringIO.open("foo", [capture_prompt: true], fn(pid) ->
42+
...> input = IO.gets(pid, ">")
43+
...> IO.write(pid, "The input was #{input}")
44+
...> StringIO.contents(pid)
45+
...> end)
46+
{:ok, {"", ">The input was foo"}}
4747
4848
"""
4949
@spec open(binary, keyword, (pid -> res)) :: {:ok, res} when res: var

0 commit comments

Comments
 (0)