summaryrefslogtreecommitdiff
path: root/warning.rb
diff options
context:
space:
mode:
Diffstat (limited to 'warning.rb')
-rw-r--r--warning.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/warning.rb b/warning.rb
index 22acd3424e..764e352296 100644
--- a/warning.rb
+++ b/warning.rb
@@ -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