Skip to content

Commit 95bff23

Browse files
Daniel PerezJosé Valim
authored andcommitted
Fix h helper for binary operators, closes #4859 (#4860)
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
1 parent 0bc0419 commit 95bff23

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/iex/lib/iex/introspection.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ defmodule IEx.Introspection do
139139
end)
140140
end
141141

142+
defp has_content?(nil),
143+
do: false
142144
defp has_content?({_, _, _, _, false}),
143145
do: false
144146
defp has_content?({{name, _}, _, _, _, nil}),

lib/iex/test/iex/helpers_test.exs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ defmodule IEx.HelpersTest do
3434
test "h helper function" do
3535
pwd_h = "* def pwd()\n\nPrints the current working directory.\n\n"
3636
c_h = "* def c(files, path \\\\ \".\")\n\nCompiles the given files."
37+
eq_h = "* def ==(left, right)\n\nReturns `true` if the two items are equal.\n\n"
3738

3839
assert capture_io(fn -> h IEx.Helpers.pwd/0 end) =~ pwd_h
3940
assert capture_io(fn -> h IEx.Helpers.c/2 end) =~ c_h
41+
assert capture_io(fn -> h ==/2 end) =~ eq_h
4042

4143
assert capture_io(fn -> h IEx.Helpers.c/1 end) =~ c_h
4244
assert capture_io(fn -> h pwd end) =~ pwd_h

0 commit comments

Comments
 (0)