From: me@... Date: 2020-12-15T00:58:35+00:00 Subject: [ruby-core:101461] [Ruby master Bug#17388] Doesn't Warning.warn support `category: :experimental` in Ruby 3.0.0? Issue #17388 has been updated by jnchito (Junichi Ito). jeremyevans0 (Jeremy Evans) wrote in #note-2: > If we are going to add support for an :experimental category, we should probably change the cases that respect `Warning[:experimental] = false` to use the :experimental category when emitting the warning. That's more complex than you probably expect, see the attached patch (no tests yet, and not sure about the ripper support). Thank you for your comment. IMO, it would be enough if the current implementation is documented (like "currently supported category is `:deprecated` only.") ---------------------------------------- Bug #17388: Doesn't Warning.warn support `category: :experimental` in Ruby 3.0.0? https://bugs.ruby-lang.org/issues/17388#change-89230 * Author: jnchito (Junichi Ito) * Status: Open * Priority: Normal * ruby -v: ruby 3.0.0preview2 (2020-12-08 master d7a16670c3) [x86_64-darwin20] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- I wrote the following script: ```ruby module Warning def self.warn(message, category: nil) puts "category=#{category}" super end end lambda(&:foo).lambda? Ractor.new{} ``` Then, run it: ``` $ ruby -w ~/Desktop/test.rb category=deprecated /Users/jnito/Desktop/test.rb:7: warning: lambda without a literal block is deprecated; use the proc without lambda instead category= :38: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. ``` I got `category=deprecated` as I expected, but got `nil` instead of `:experimental`. I feel it should be `:experimental`. This issue is related to https://bugs.ruby-lang.org/issues/17122 ---Files-------------------------------- experimental.diff (5.2 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: