The taint mechanism will be deprecated in Ruby 2.7#108
Closed
kamipo wants to merge 1 commit intotzinfo:masterfrom
Closed
The taint mechanism will be deprecated in Ruby 2.7#108kamipo wants to merge 1 commit intotzinfo:masterfrom
kamipo wants to merge 1 commit intotzinfo:masterfrom
Conversation
The Ruby core team decided to deprecate the taint mechanism in Ruby 2.7 and will remove that in Ruby 3. https://bugs.ruby-lang.org/issues/16131 ruby/ruby#2476 In Ruby 2.7, `Object#{taint,untaint,trust,untrust}` and related functions in the C-API no longer have an effect (all objects are always considered untainted), and are now warned deprecation message. https://buildkite.com/rails/rails/builds/65069#dddcc2a1-a23c-4bc2-9eaf-351295244d1f/991-993
Member
|
TZInfo currently supports running in safe mode with Ruby < 2.7. With this pull request applied, this scenario no longer works: I'd prefer to maintain support for safe mode for the time being, but avoid the warnings when running on Ruby 2.7. I'd probably look to conditionally define a helper 'untaint' method and use that in place of calls to if RUBY_VERSION >= '2.7'
def untaint(obj)
obj
end
else
def untaint(obj)
obj.untaint
end
endRather than testing the |
kamipo
added a commit
to kamipo/tzinfo
that referenced
this pull request
Nov 24, 2019
The Ruby core team decided to deprecate the taint mechanism in Ruby 2.7 and will remove that in Ruby 3. https://bugs.ruby-lang.org/issues/16131 ruby/ruby#2476 This is an alternative of tzinfo#108.
Contributor
Author
|
Closing this in favor of #109. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Ruby core team decided to deprecate the taint mechanism in Ruby 2.7
and will remove that in Ruby 3.
https://bugs.ruby-lang.org/issues/16131
ruby/ruby#2476
In Ruby 2.7,
Object#{taint,untaint,trust,untrust}and relatedfunctions in the C-API no longer have an effect (all objects are always
considered untainted), and are now warned deprecation message.
https://buildkite.com/rails/rails/builds/65069#dddcc2a1-a23c-4bc2-9eaf-351295244d1f/991-993