summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS.md8
-rw-r--r--spec/ruby/core/warning/element_reference_spec.rb7
2 files changed, 15 insertions, 0 deletions
diff --git a/NEWS.md b/NEWS.md
index 834b69c079..d1d60798d0 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -7,6 +7,12 @@ Note that each entry is kept to a minimum, see links for details.
## Language changes
+## Command line options
+
+* A new `performance` warning category was introduced.
+ They are not displayed by default even in verbose mode.
+ Turn them on with `-W:performance` or `Warning[:performance] = true`. [[Feature #19538]]
+
## Core classes updates
Note: We're only listing outstanding class updates.
@@ -79,5 +85,7 @@ changelog for details of the default gems or bundled gems.
## JIT
[Bug #19150]: https://bugs.ruby-lang.org/issues/19150
+[Feature #18498]: https://bugs.ruby-lang.org/issues/18498
[Feature #19314]: https://bugs.ruby-lang.org/issues/19314
[Feature #19347]: https://bugs.ruby-lang.org/issues/19347
+[Feature #19538]: https://bugs.ruby-lang.org/issues/19538 \ No newline at end of file
diff --git a/spec/ruby/core/warning/element_reference_spec.rb b/spec/ruby/core/warning/element_reference_spec.rb
index 67728ca0f6..41129e533a 100644
--- a/spec/ruby/core/warning/element_reference_spec.rb
+++ b/spec/ruby/core/warning/element_reference_spec.rb
@@ -8,6 +8,13 @@ describe "Warning.[]" do
end
end
+ ruby_version_is '3.3' do
+ it "returns default values for :performance category" do
+ ruby_exe('p Warning[:performance]').chomp.should == "false"
+ ruby_exe('p Warning[:performance]', options: "-w").chomp.should == "false"
+ end
+ end
+
it "raises for unknown category" do
-> { Warning[:noop] }.should raise_error(ArgumentError, /unknown category: noop/)
end