Skip to content

Commit

Permalink
Fix Can't sort via symbols in older rubies
Browse files Browse the repository at this point in the history
  • Loading branch information
nowk committed Sep 1, 2012
1 parent 88d5247 commit 5a04bb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/url2png/url_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def query_string_builder(url, options = {})
options[:viewport] || url2png_conf.viewport_dimensions
}

params.sort_by { |o| o[0] }.inject([]) { |memo, obj|
params.sort_by { |o| o[0].to_s }.inject([]) { |memo, obj|
k, v = *obj.map(&:to_s)
memo << [CGI.escape(k), CGI.escape(v)].join("=") if v && !v.empty?
memo
Expand Down

0 comments on commit 5a04bb9

Please sign in to comment.