[ruby-core:96362] [Ruby master Bug#16438] Check warning messages for Ruby 2.7

[email protected]
Newsgroups gmane.comp.lang.ruby.core
Message-ID <redmine.journal-83272.20191220025053.7cdef4933dc9c5b3@ruby-lang.org>
Issue #16438 has been updated by ko1 (Koichi Sasada).


```ruby
$SAFE = 1
#=> t.rb:1: warning: $SAFE will become a normal global variable in Ruby 3.0
```

> # no warning

pls check current master.

----------------------------------------
Bug #16438: Check warning messages for Ruby 2.7
https://bugs.ruby-lang.org/issues/16438#change-83272

* Author: ko1 (Koichi Sasada)
* Status: Open
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version: 2.7
* ruby -v: 
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Please check Ruby 2.7 new introduced warning messages.

* deprecation warning

```ruby
def foo(**kw)
end

foo({}) #=> test.rb:4: warning: The last argument is used as the keyword parameter
        #   test.rb:1: warning: for `foo' defined here; maybe ** should be added to the call?
# deafult: on
```

```ruby
_1 = 2
#=>
# t.rb:1: warning: `_1' is used as numbered parameter

# default: on
```

```ruby
def _1; end
#=> test.rb:1: warning: `_1' is used as numbered parameter

# deafult: on
# added at Today!!
```

```ruby
def foo
  proc.call #=> 1
end

foo{p 1}
#=>
# t.rb:2: warning: Capturing the given block using Kernel#proc is deprecated; use `&block` instead
# 1

# default: on
```

```ruby
$; = //
#=> t.rb:1: warning: non-nil $; will be deprecated

$, = ''
#=> t.rb:2: warning: non-nil $, will be deprecated

# default: on
```

```ruby
   def foo
     class << Object.new
       yield
     end
   end
   foo { p :ok } #=> warning: `yield' in class syntax will not be supported from Ruby 3.0.

# default: on
```

```ruby
require 'open-uri'
open('http://atdot.net')
#=> test.rb:2: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open

# default: on
```

* experimental feature

```
$ ./miniruby -e 'case 1; in 1; end'
-e:1: warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!

# default: on
```




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

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.