Issue #12938 has been reported by Charles Nutter.

----------------------------------------
Bug #12938: forwardable.rb is no longer compatible with any alternative implementation
https://bugs.ruby-lang.org/issues/12938

* Author: Charles Nutter
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: master as of today
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
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).



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>