Issue #22205 has been updated by jeremyevans0 (Jeremy Evans). I figured this day would come eventually. :) There is no doubt that `ruby2_keywords` significantly complicates the internals, and enough time has passed that I'm not against this change. That said, removing `ruby2_keywords` will make it more difficult to continue to support Ruby versions before 3.0 (it's still possible, but it requires ugly code duplication). Certainly in my libraries (most of which currently still support Ruby 1.9.2+), if the library currently uses `ruby2_keywords`, I'll drop compatibility for Ruby 1.9 and 2.x. I request an extended deprecation cycle for this: 4.1: Documentation-only deprecation 4.2: Verbose-mode deprecation warning 4.3: Non-verbose-mode deprecation warning 4.4: Removal If that is too long, maybe: 4.1: Documentation-only deprecation 4.2: Non-verbose-mode deprecation warning 4.3: Removal I'd like at least Ruby 4.1 to be documentation-only deprecation so the community (myself included) has sufficient time (17 months instead of 5 months) to replace use of `ruby2_keywords` before it starts emitting deprecation warnings. ---------------------------------------- Feature #22205: Add deprecation warnings for ruby2_keywords https://bugs.ruby-lang.org/issues/22205#change-118152 * Author: shugo (Shugo Maeda) * Status: Open ---------------------------------------- I believe ruby2_keywords should be removed in the future, but removing it now would cause compatibility issues. As a first step, how about adding deprecation warnings to ruby2_keywords? At least the following methods should emit a warning: * Module#ruby2_keywords * main.ruby2_keywords * Proc#ruby2_keywords The following methods are relatively harmless, so it might be better not to warn on them in the first step: * Hash.ruby2_keywords_hash? * Hash.ruby2_keywords_hash ## Background and Motivation While implementing Proc#refined, I noticed that the ruby2_keywords flag on an iseq (param.flags.ruby2_keywords) can be mutated by Proc#ruby2_keywords even when the iseq is shared among multiple Ractors, which is not Ractor-safe. I consider ruby2_keywords a negative legacy, and I would rather deprecate it than fix such behavior. -- https://bugs.ruby-lang.org/