Skip to content

Commit 15236c3

Browse files
committed
Fix String.contains? not raising on non-string arg
1 parent 34b6e17 commit 15236c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/elixir/lib/string.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ defmodule String do
983983
do_contains(string, match)
984984
end
985985

986-
defp do_contains(_, "") do
986+
defp do_contains(string, "") when is_binary(string) do
987987
true
988988
end
989989

0 commit comments

Comments
 (0)