tab#to_json: allow zero parameters.

This commit is contained in:
Mike McQuaid 2019-03-18 15:04:37 +00:00
parent 14dc7d6bb8
commit 803ea4ed1a
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -324,7 +324,7 @@ class Tab < OpenStruct
Time.at(super)
end
def to_json(_opts)
def to_json(options = nil)
attributes = {
"homebrew_version" => homebrew_version,
"used_options" => used_options.as_flags,
@ -344,7 +344,7 @@ class Tab < OpenStruct
"source" => source,
}
JSON.generate(attributes)
JSON.generate(attributes, options)
end
def write