Only call Object#taint when the taint method exists#1419
Only call Object#taint when the taint method exists#1419lsegal merged 1 commit intolsegal:mainfrom jcouball:main
Conversation
lsegal
left a comment
There was a problem hiding this comment.
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 |
lsegal
left a comment
There was a problem hiding this comment.
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
taintmechanism, 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#untrustand 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#untrustare 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 rakelocally (if code is attached to PR).