Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Warning#warn

warn(msg, category: nil) → nil

Writes warning message msg to $stderr. This method is called by Ruby for all emitted warnings. A category may be included with the warning.

See the documentation of the Warning module for how to customize this.

Ruby version changes

  1. 3.0
See also .[]= .[] also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1