Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Make Rack::Request#{[],[]=} warn even in non-verbose mode #1690

Merged
merged 1 commit into from Jul 14, 2020

Conversation

jeremyevans
Copy link
Contributor

Additionally, use the :uplevel keyword to warn, so it includes
the caller information in the warning output (similar to rb_warn).
This only works on Ruby 2.5+, so output will look a little odd on
Ruby 2.3/2.4, but I don't think it warrants separate handling in
older versions.

Fixes #1277

Copy link
Member

@tenderlove tenderlove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will test against Rails. I don't think Rails is using this, but maybe?

Additionally, use the :uplevel keyword to warn, so it includes
the caller information in the warning output (similar to rb_warn).
This only works on Ruby 2.5+, so output will look a little odd on
Ruby 2.3/2.4, but I don't think it warrants separate handling in
older versions.

Fixes rack#1277
@jeremyevans jeremyevans force-pushed the non-verbose-request-aref-1277 branch from e3a0279 to 058fa08 Compare July 14, 2020 18:53
@jeremyevans jeremyevans merged commit 294fd23 into rack:master Jul 14, 2020
@ioquatix
Copy link
Member

Would it make more sense to remove these methods for Rack 3.0? Rack 4.0?

@jeremyevans
Copy link
Contributor Author

They were only warned in non-verbose mode before, so going directly to removed is likely to break things. We can probably remove them in Rack 3.1 or 4.0.

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

Successfully merging this pull request may close these issues.

Clarification regarding Rack::Request#[]
3 participants