Permalink
Browse files

[Specification] When overriding to_json, pass on generator arguments.

It is up to the caller to decide wether or not to generate a pretty
version of the JSON.

See https://github.com/flori/json/blob/master/README.rdoc#more-examples.
  • Loading branch information...
1 parent e82b1c8 commit a3117a0f0affeebd913a37fcc9c9222fad7c4dbb @alloy alloy committed Dec 22, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/cocoapods-core/specification/json.rb
@@ -4,9 +4,9 @@ module JSONSupport
# @return [String] the json representation of the specification.
#
- def to_json
+ def to_json(*a)
require 'json'
- JSON.pretty_generate(to_hash)
+ to_hash.to_json(*a)
end
#-----------------------------------------------------------------------#

1 comment on commit a3117a0

Owner

fabiopelosin commented on a3117a0 Mar 24, 2014

👍

Please sign in to comment.