multipart-post icon indicating copy to clipboard operation
multipart-post copied to clipboard

UploadIO doesn't work for StringIOs in Ruby 1.9.2

Open arsduo opened this issue 14 years ago • 3 comments

In Ruby 1.8.7, StringIO responds to path, but in 1.9.2, it no longer does, which causes UploadIO to break (composite_io.rb:69).

An easy solution would be to check for obj.respond_to? :path ? obj.path : "no local path" (in my tests, supplying a dummy local path seems to work), but I don't know if that causes problems down the line. If not, one of us could write a pull request.

Thanks for the great gem!

Alex

arsduo avatar May 12 '11 17:05 arsduo

Feel free to send a pull request with that change, I'll merge it right away. Thanks for reporting the issue.

nicksieger avatar May 12 '11 21:05 nicksieger

With the 3.0 release, we will drop support for any ruby < 2.0 so this may no longer be an issue. Do you mind providing a failing test case so we can see if this behaviour still exists?

ioquatix avatar May 02 '17 23:05 ioquatix

See #92 for discussion bout supported Ruby versions.

tnir avatar Jun 06 '22 05:06 tnir