Skip to content

Commit

Permalink
Collapse handling of Symbol and String into one case
Browse files Browse the repository at this point in the history
  • Loading branch information
cjlarose committed Nov 6, 2020
1 parent 98b3408 commit 28e9d8f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/puma/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,8 @@ def serialize_string(output, value)

def serialize_object_key(output, value)
case value
when Symbol
when Symbol, String
serialize_string output, value.to_s
when String
serialize_string output, value
else
raise SerializationError, "Could not serialize object of type #{value.class} as object key"
end
Expand Down

0 comments on commit 28e9d8f

Please sign in to comment.