Skip to content

Commit b58b498

Browse files
committed
Make Gson adapter explicitly read StringIO object
1 parent ae2ca55 commit b58b498

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/multi_json/adapters/gson.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class Gson < Adapter
88
ParseError = ::Gson::DecodeError
99

1010
def load(string, options={})
11+
string = string.read if StringIO === string
1112
::Gson::Decoder.new(options).decode(string)
1213
end
1314

0 commit comments

Comments
 (0)