forwardable.rb is no longer compatible with any alternative implementation
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).
- lib/forwardable/impl.rb (_valid_method?, _compile_method): extract to separate implementation specific part. [ruby-core:78138] [Bug #12938]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e