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:
parent
2427393b4d
commit
d5ffa4e9a4
1 changed files with 4 additions and 1 deletions
|
@ -5,7 +5,7 @@ module Kernel
|
||||||
module_function
|
module_function
|
||||||
|
|
||||||
# call-seq:
|
# call-seq:
|
||||||
# warn(*msgs, uplevel: nil) -> nil
|
# warn(*msgs, uplevel: nil, category: nil) -> nil
|
||||||
#
|
#
|
||||||
# If warnings have been disabled (for example with the
|
# If warnings have been disabled (for example with the
|
||||||
# <code>-W0</code> flag), does nothing. Otherwise,
|
# <code>-W0</code> flag), does nothing. Otherwise,
|
||||||
|
@ -39,6 +39,9 @@ module Kernel
|
||||||
#
|
#
|
||||||
# baz.rb:6: warning: invalid call to foo
|
# 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)
|
def warn(*msgs, uplevel: nil, category: nil)
|
||||||
Primitive.rb_warn_m(msgs, uplevel, category)
|
Primitive.rb_warn_m(msgs, uplevel, category)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue