Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. 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.2 · 3.1 · 3.0