-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Only call Object#taint when the taint method exists #1419
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would still want to support taint for Ruby versions that support it.
Signed-off-by: James Couball <jcouball@yahoo.com>
@lsegal I changed the implementation to call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff! Thanks so much for this PR!
Fails with ```load_setup_rb': undefined method `taint'`` Fixed in YARD but not released yet: lsegal/yard#1419
@lsegal Any chance you will release this change soon? Really want to test my CI with |
@ShockwaveNN here is what I did as a temporary workaround until a new YARD version is published: ruby-git/ruby-git#573 |
@jcouball Thanks, not a big fan of installing something from master ) I'm interesting if there is some specific problem why owner cannot release (something like v0.9.28) with this fix |
@ShockwaveNN 100% agree, but I was tired of failing builds. While I understand that YARD is only a dev dependency and Ruby 3.2 isn't released, fingers crossed that @lsegal will make a release soon with this fix. |
Description
Running YARD with Ruby 3.2 (current Ruby HEAD) results in the error:
This is because the
taint
mechanism, which was deprecated in Ruby 2.7 is to be removed from Ruby 3.2. In Ruby 2.7, the taint checking functionality was removed andObject#taint
,Object#trust
,Object#untaint
,Object#untrust
and related methods have no-op implementations. This means all objects by default are deemed untainted.In Ruby 3.2 (the current HEAD),
Object#taint
,Object#trust
,Object#untaint
,Object#untrust
are completely removed.See the article Ruby 2.7 removes taint checking mechanism for a summary of the timeline for removal of the taint mechanism and links to Ruby core team discussions.
Caveats
I ran tests locally after making these changes in Ruby 2.4.x so the CI matrix build will need to be completed to make sure that these changes do not impact tests on all supported versions of Ruby.
Completed Tasks
bundle exec rake
locally (if code is attached to PR).