We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6d97c3 commit a8eab99Copy full SHA for a8eab99
lib/elixir/lib/kernel.ex
@@ -1769,19 +1769,23 @@ defmodule Kernel do
1769
1770
@doc """
1771
Checks if the given argument is a regex.
1772
+
1773
+ Works in guard clauses.
1774
"""
1775
defmacro is_regex(thing) do
1776
quote do
- is_record(unquote(thing), Regex)
1777
+ Kernel.is_record(unquote(thing), Regex)
1778
end
1779
1780
1781
1782
Checks if the given argument is a range.
1783
1784
1785
1786
defmacro is_range(thing) do
1787
- is_record(unquote(thing), Range)
1788
+ Kernel.is_record(unquote(thing), Range)
1789
1790
1791
0 commit comments