Project

General

Profile

Bug #16901

`-W:no-deprecated` does not stop some deprecated warnings

Added by znz (Kazuhiro NISHIYAMA) 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
[ruby-core:98446]

Description

$ ruby -v -W:no-deprecated -e 'IO.read(IO::NULL,{dummy:0})'
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
-e:1: warning: Using the last argument as keyword parameters is deprecated

I attach a draft patch for ruby_2_7 branch.
I don't know where declaration of rb_warn_deprecated should be.


Files

use-rb_warn_deprecated-instead-of-rb_warn.diff (1.82 KB) use-rb_warn_deprecated-instead-of-rb_warn.diff znz (Kazuhiro NISHIYAMA), 05/20/2020 02:55 AM
use-rb_warn_deprecated-instead-of-rb_warn-2.diff (2.54 KB) use-rb_warn_deprecated-instead-of-rb_warn-2.diff update declaration position znz (Kazuhiro NISHIYAMA), 05/20/2020 12:58 PM

Updated by nobu (Nobuyoshi Nakada) 3 months ago

znz (Kazuhiro NISHIYAMA) wrote:

I don't know where declaration of rb_warn_deprecated should be.

include/ruby/internal/error.h?

Updated by nobu (Nobuyoshi Nakada) 3 months ago

Sorry, it's for 2.7.
It should be in ruby/ruby.h, near rb_warn and so on.

Updated by nagachika (Tomoyuki Chikanaga) 3 months ago

  • Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED

Thank you for the patch for 2.7. I will fill Backport field and close this ticket to be noticed as backport ticket.

#4

Updated by nagachika (Tomoyuki Chikanaga) 3 months ago

  • Status changed from Open to Closed

Also available in: Atom PDF