Bug #12938
closedforwardable.rb is no longer compatible with any alternative implementation
Description
The following commits have made forwardable.rb unusable on any implementation except MRI, because they use YARV-specific RubyVM module and features. I believe all of these changes were done by nobu.
These introduce uses of RubyVM::InstructionSequence, which does not (and probably will not ever) exist on other Ruby implementations:
r53383: forwardable.rb: adjust backtrace by tail call
r55376: forwardable.rb: optimize awy send
This commit moves code around, so I wasn't sure if anything incompatible was introduced.
r55366: forwardable.rb: fix for non-module objects
The standard library of Ruby is shared by all Ruby implementations, and I believe every effort should be made to avoid using MRI-specific features. If such features must be used, there must always be a fallback path that works on all Rubies of a given compatibility level (2.4 in this case).