So it turns out that since we turned on reified instance variables by default, those variables have not been volatile. This is actually good news, since we wanted to move away from a full volatility guarantee on instance variables in favor of explicit declaration (
This PR simply flips the switch for the remaining varTable-based instance variables, bringing them in line with field-based instance variables as far as volatility goes.
I have also filed #5186 to finish the reification project and add back the ability to turn on volatility as desired. This will be needed in any case to support declarative volatility in a future update to Ruby.
The field-based variables we used by default during 9.1.x already were not volatile, which is the direction we want to move people. Volatility should be achieved through libraries like concurrent-ruby, or added to Ruby as a way to declare volatility at class definition time (attr_accessor :foo, volatile: true). The risk here seems small since 99% of variable accesses have already been nonvolatile for over a year, all major concurrency libraries are using the proper mechanisms that don't require instance variable volatility, and we have received no bugs where nonvolatile field-based variables were the cause.