Issue #16420 has been updated by nobu (Nobuyoshi Nakada).


Changing the flag at runtime causes problems, mainly editors' syntax highlighting, `ruby -c` etc.

How about a new "magic comment" pragma?
```ruby
# -*- experimental-syntax: true -*-
```
or, more strictly
```ruby
# -*- experimental-syntax: pattern-matching -*-
```


----------------------------------------
Feature #16420: Warning[:experimental]=false
https://bugs.ruby-lang.org/issues/16420#change-83311

* Author: znz (Kazuhiro NISHIYAMA)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 2.7
----------------------------------------
Current master always warn pattern matching syntax.
It discourage users try them.

Another noisy warnings can stop by `Warning[:deprecated]=false`.

So I think the future may be more useful if `Warning[:experimental]=false` or `Warning[:pattern_matching]=false` can stop warnings.



-- 
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>