Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

warning on ruby 2.4.0 #123

Open
arthurnn opened this issue Jan 6, 2017 · 9 comments
Open

warning on ruby 2.4.0 #123

arthurnn opened this issue Jan 6, 2017 · 9 comments

Comments

@arthurnn
Copy link
Collaborator

arthurnn commented Jan 6, 2017

getting the following warning on ruby 2.4.0

/Users/arthurnn/.gem/ruby/2.4.0/gems/s3-0.3.25/lib/s3/bucket.rb:209:in `bucket_request': S3::Bucket#service_request at /Users/arthurnn/.rubies/ruby-2.4.0/lib/ruby/2.4.0/forwardable.rb:156 forwarding to private method S3::Service#service_request

that is happening at the service.buckets.find method

@joseairosa
Copy link

S3::Object#bucket_request is delegating to S3::Bucket#bucket_request which is a private method. This was identified as an unwanted "fixed" bug... as you should not be able to delegate to private methods, but it was decided to throw a warning instead. I believe this will be removed at some point. I'll try to open a PR with a fix for this asap.

@arthurnn
Copy link
Collaborator Author

arthurnn commented Feb 9, 2017

thanks @joseairosa

@krunalsha
Copy link

Getting same warning

@joseairosa
Copy link

Still didn't have time to do this, apologies :(

@stevebissett
Copy link

This issue is still present?

Is the aim to remove the warning? Or stop delegation to the private method?
Would like to help how I can to close this out this week if possible @joseairosa

@joseairosa
Copy link

@stevebissett definitely still needs to be fixed, I just haven't been able to get around it and do it.

I'll try to do it this upcoming weekend.

@qoobaa
Copy link
Owner

qoobaa commented Jan 11, 2018

I've just released 0.3.26 - let me know if something is still broken.

@stuartrr
Copy link

0.3.26 broke something for us. I didn't investigate and just pinned Gemfile to 0.3.25. I'll try to take a look at what it was next week.

The symptom was that object.content was always 27 bytes compressed when sent over the wire using code like this:

send_data object.content, filename: "somename.jpeg", type: "application/octet-stream"

ruby 2.3.5p376 (2017-09-14 revision 59905) [x86_64-linux-gnu]
rails 3.2.22

@maknz
Copy link

maknz commented Mar 18, 2019

Forwardable is used in S3::Object too, which is causing similar issues on newer Ruby. The S3::Bucket fix worked nicely, however.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants