Issue #7704 has been updated by naruse (Yui NARUSE).


mpapis (Michal Papis) wrote:
> With multiple Ruby implementations and "experimental" features like "refinements" it would be nice to have an array or hash including list of enabled language features so developers could check it instead of auto-discovering code with some hacks.

Such feature list system is used on many languages/platforms like W3C DOM.
As far as my understand such experiment are failed because such feature list is too rough to use.
Features are not all or nothing in real world, and they often have bugs.
So auto discovery won't work.

> Additionally a new keyword like `require_features :refinements, ...` could be introduced to allow easy validation via either exception or return status.

Use defined?(define_method) or defined?(using).
----------------------------------------
Feature #7704: Add a list of enabled (experimental) language features.
https://bugs.ruby-lang.org/issues/7704#change-35442

Author: mpapis (Michal Papis)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 


With multiple Ruby implementations and "experimental" features like "refinements" it would be nice to have an array or hash including list of enabled language features so developers could check it instead of auto-discovering code with some hacks.

Additionally a new keyword like `require_features :refinements, ...` could be introduced to allow easy validation via either exception or return status.


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