Skip to content

Commit

Permalink
Added to_s to query variables
Browse files Browse the repository at this point in the history
This allows symbols as keys and integers and other fun stuff as values
  • Loading branch information
titanous committed Sep 13, 2008
1 parent 1ca5bb0 commit 096ef68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/scrobbler/rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def request(resource, method = "get", args = nil)

if args
# TODO: What about keys without value?
url.query = args.map { |k,v| "%s=%s" % [URI.encode(k.to_s), URI.encode(v)] }.join("&")
url.query = args.map { |k,v| "%s=%s" % [URI.encode(k.to_s), URI.encode(v.to_s)] }.join("&")
end

case method
Expand Down

0 comments on commit 096ef68

Please sign in to comment.