Skip to content

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

class method

Warning.[]

Warning[category] → true or false

Returns the flag to show the warning messages for category. Supported categories are:

:deprecated

deprecation warnings

  • assignment of non-nil value to $, and $;

  • keyword arguments

  • proc/lambda without block

etc.

:experimental

experimental features

  • Pattern matching

See also .[]= #warn also in 4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0