1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Fixed order of allowed formats to be sorted.

This commit is contained in:
John Nunemaker 2009-07-19 19:55:07 -04:00
parent ae3cd0f0dd
commit a236fb08af

View file

@ -105,7 +105,7 @@ module HTTParty
# format :json
# end
def format(f)
raise UnsupportedFormat, "Must be one of: #{AllowedFormats.values.map(&:to_s).uniq.sort.join(', ')}" unless AllowedFormats.value?(f)
raise UnsupportedFormat, "Must be one of: #{AllowedFormats.values.map { |v| v.to_s }.uniq.sort.join(', ')}" unless AllowedFormats.value?(f)
default_options[:format] = f
end