summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2019-12-23 02:34:16 -0500
committerMarc-Andre Lafortune <github@marc-andre.ca>2019-12-23 16:47:33 -0500
commit819b604037c317d2b53a1aaca67aef25da2d5ec9 (patch)
tree0dfc97bef8bdac44091e2c627325ed61fd61a16c /class.c
parentdf6f5c44af1f261fa940ec3954468be8b820450e (diff)
Reword keyword arguments warning messages to convey these are deprecation warnings
Diffstat (limited to 'class.c')
-rw-r--r--class.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/class.c b/class.c
index cceba6a..c866d1d 100644
--- a/class.c
+++ b/class.c
@@ -2051,7 +2051,7 @@ rb_scan_args_parse(int kw_flag, int argc, const VALUE *argv, const char *fmt, st
if (!keyword_given && !last_hash_keyword) {
/* Warn if treating positional as keyword, as in Ruby 3,
this will be an error */
- rb_warn("The last argument is used as keyword parameters");
+ rb_warn("Using the last argument as keyword parameters is deprecated");
}
argc--;
}
@@ -2066,7 +2066,7 @@ rb_scan_args_parse(int kw_flag, int argc, const VALUE *argv, const char *fmt, st
}
else if (arg->f_hash && keyword_given && arg->n_mand == argc) {
/* Warn if treating keywords as positional, as in Ruby 3, this will be an error */
- rb_warn("The keyword argument is passed as the last hash parameter");
+ rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
}
}
if (arg->f_hash && arg->n_mand == argc+1 && empty_keyword_given) {
@@ -2075,7 +2075,7 @@ rb_scan_args_parse(int kw_flag, int argc, const VALUE *argv, const char *fmt, st
ptr[argc] = rb_hash_new();
argc++;
*(&argv) = ptr;
- rb_warn("The keyword argument is passed as the last hash parameter");
+ rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
}
arg->argc = argc;