Permalink
Browse files

Elixir doesn't export vars outside of the scope of the case

  • Loading branch information...
1 parent 77a222c commit a4aae125ba3c267273ca363ff569d68ef7c61cee @guilleiguaran guilleiguaran committed Jan 5, 2014
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/dynamo/connection/query_parser.ex
@@ -79,10 +79,11 @@ defmodule Dynamo.Connection.QueryParser do
# not yet. This assumes that items are iterated in
# reverse order.
defp assign_parts([key,""|t], acc, value) do
- case Binary.Dict.get(acc, key, []) do
- current when is_list(current) -> current
- _ -> raise ParseError, message: "expected list at #{key}"
- end
+ current =
+ case Binary.Dict.get(acc, key, []) do
+ current when is_list(current) -> current
+ _ -> raise ParseError, message: "expected list at #{key}"
+ end
if value = assign_list_parts(t, value) do
Binary.Dict.put(acc, key, [value|current])

0 comments on commit a4aae12

Please sign in to comment.