Skip to content

Commit 24daffb

Browse files
whatyouhidejosevalim
authored andcommitted
Add guards to Calendar.put_time_zone_database/1 (#12049)
1 parent 189d61b commit 24daffb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/elixir/lib/calendar.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ defmodule Calendar do
365365
"""
366366
@doc since: "1.8.0"
367367
@spec put_time_zone_database(time_zone_database()) :: :ok
368-
def put_time_zone_database(database) do
368+
def put_time_zone_database(database) when is_atom(database) do
369369
Application.put_env(:elixir, :time_zone_database, database)
370370
end
371371

0 commit comments

Comments
 (0)