Fix unbound variable error in Elixir v1.5.0-dev
It's not clear to me why "e in _" ever worked, but this seems to make things better. Afaict, the point of these clauses are to "rescue anything".
This commit is contained in:
@@ -22,7 +22,7 @@ defmodule Koans do
|
|||||||
unquote(compiled_body)
|
unquote(compiled_body)
|
||||||
:ok
|
:ok
|
||||||
rescue
|
rescue
|
||||||
e in _ -> e
|
e -> e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -37,7 +37,7 @@ defmodule Koans do
|
|||||||
unquote(single_var)
|
unquote(single_var)
|
||||||
:ok
|
:ok
|
||||||
rescue
|
rescue
|
||||||
e in _ -> e
|
e -> e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -52,7 +52,7 @@ defmodule Koans do
|
|||||||
unquote(multi_var)
|
unquote(multi_var)
|
||||||
:ok
|
:ok
|
||||||
rescue
|
rescue
|
||||||
e in _ -> e
|
e -> e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user