Project

General

Profile

Actions

Bug #17523

closed

Inconsistent Warning[] values in scripts loaded by -r option

Added by nobu (Nobuyoshi Nakada) almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:101991]

Description

While -w option affects $VERBOSE for both the main and required scripts, but affects Warning[] values only in the main script.

In this example, Warning[:deprecated] should be consistent as well as $VERBOSE.

v.rb
p $VERBOSE
p %i[deprecated experimental].to_h{|i|[i,Warning[i]]}
result
$ ruby -w -r./v -e 'p $VERBOSE, %i[deprecated experimental].to_h{|i|[i,Warning[i]]}'
true
{:deprecated=>false, :experimental=>true}
true
{:deprecated=>true, :experimental=>true}
patch
Actions #1

Updated by nobu (Nobuyoshi Nakada) almost 4 years ago

  • Description updated (diff)
Actions #2

Updated by nobu (Nobuyoshi Nakada) almost 4 years ago

  • Status changed from Open to Closed

Applied in changeset git|6f6dfdcc685077f0f85dcdd63843ecfc0f6fbfb6.


Make warning values consistent [Bug #17523]

They should be affected, as well as $VERBOSE, by -w/-W
options, not only in the main script but in scripts loaded by -r
option too.

Updated by naruse (Yui NARUSE) almost 4 years ago

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

ruby_3_0 9aa7b57ba4453fce871011c1d9587536d425700f merged revision(s) 6f6dfdcc685077f0f85dcdd63843ecfc0f6fbfb6.

Actions #4

Updated by nagachika (Tomoyuki Chikanaga) over 3 years ago

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

ruby_2_7 14823c2d7c20dba288025749b4d55c02d8729871 merged revision(s) 6f6dfdcc685077f0f85dcdd63843ecfc0f6fbfb6.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0