1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[DOC] mentioned category option

This commit is contained in:
Nobuyoshi Nakada 2020-12-08 19:32:33 +09:00
parent 2427393b4d
commit d5ffa4e9a4
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -5,7 +5,7 @@ module Kernel
module_function
# call-seq:
# warn(*msgs, uplevel: nil) -> nil
# warn(*msgs, uplevel: nil, category: nil) -> nil
#
# If warnings have been disabled (for example with the
# <code>-W0</code> flag), does nothing. Otherwise,
@ -39,6 +39,9 @@ module Kernel
#
# baz.rb:6: warning: invalid call to foo
#
# If the +category+ keyword argument is given, it is passed to
# Warning.warn method.
#
def warn(*msgs, uplevel: nil, category: nil)
Primitive.rb_warn_m(msgs, uplevel, category)
end