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

bootsnap-1.7.3/lib/bootsnap/load_path_cache/cache.rb:208: warning: Object#untaint is deprecated and will be removed in Ruby 3.2. #360

Closed
brendon opened this issue May 3, 2021 · 7 comments

Comments

@brendon
Copy link

brendon commented May 3, 2021

I'm getting this warning for this line.

-File.join(p, f).untaint

Is it worth removing now since this is going away anyway?

@casperisfine
Copy link
Contributor

That code path should only be executed on older Rubies. What Ruby are you using?

@brendon
Copy link
Author

brendon commented May 4, 2021

I'm using Ruby 2.7.3 with Rails 6.1.3.1.

@casperisfine
Copy link
Contributor

Hum, apparently it happens on CI as well: https://github.com/Shopify/bootsnap/runs/2447729909#step:5:56

Must be a subtle change in 2.7.3, I'll have a look

@casperisfine
Copy link
Contributor

Ok, there's indeed a regression in Ruby 2.7.3... I just can't figure out how it happened though, as there no string change at all in the diff: ruby/ruby@v2_7_2...v2_7_3

@brendon
Copy link
Author

brendon commented May 4, 2021

That's pretty interesting. How are you detecting older rubies in this case?

@casperisfine
Copy link
Contributor

I released a 1.7.5 with a fix.

I still can't explain this regression, but more worrying I can't really explain how it worked on 2.7.2 :/

How are you detecting older rubies in this case?

I do some feature detection on the behavior of String#-@. Recent rubies are smart enough to be able to directly intern the received string if it's already frozen. The code was assuming that if this behavior was not present we'd be on 2.5 or older. Looks like it's not longer the case.

@brendon
Copy link
Author

brendon commented May 4, 2021

Thanks @casperisfine, such fast work! I've deployed it already too :D

Have a great day!

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

No branches or pull requests

2 participants