Bug #16901 » use-rb_warn_deprecated-instead-of-rb_warn-2.diff
include/ruby/ruby.h | ||
---|---|---|
PRINTF_ARGS(void rb_sys_warning(const char*, ...), 1, 2);
|
||
/* reports always */
|
||
COLDFUNC PRINTF_ARGS(void rb_warn(const char*, ...), 1, 2);
|
||
PRINTF_ARGS(void rb_warn_deprecated(const char *fmt, const char *suggest, ...), 1, 3);
|
||
PRINTF_ARGS(void rb_compile_warn(const char *, int, const char*, ...), 3, 4);
|
||
#define RB_BLOCK_CALL_FUNC_STRICT 1
|
||
... | ... | |
if (!keyword_given) {
|
||
/* Warn if treating positional as keyword, as in Ruby 3,
|
||
this will be an error */
|
||
rb_warn("Using the last argument as keyword parameters is deprecated");
|
||
rb_warn_deprecated("Using the last argument as keyword parameters", NULL);
|
||
}
|
||
argc--;
|
||
}
|
||
... | ... | |
}
|
||
else if (f_hash && keyword_given && n_mand == argc) {
|
||
/* Warn if treating keywords as positional, as in Ruby 3, this will be an error */
|
||
rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
|
||
rb_warn_deprecated("Passing the keyword argument as the last hash parameter", NULL);
|
||
}
|
||
}
|
||
if (f_hash && n_mand > 0 && n_mand == argc+1 && empty_keyword_given) {
|
||
... | ... | |
ptr[argc] = rb_hash_new();
|
||
argc++;
|
||
*(&argv) = ptr;
|
||
rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
|
||
rb_warn_deprecated("Passing the keyword argument as the last hash parameter", NULL);
|
||
}
|
||
internal.h | ||
---|---|---|
NORETURN(void rb_async_bug_errno(const char *,int));
|
||
const char *rb_builtin_type_name(int t);
|
||
const char *rb_builtin_class_name(VALUE x);
|
||
PRINTF_ARGS(void rb_warn_deprecated(const char *fmt, const char *suggest, ...), 1, 3);
|
||
#ifdef RUBY_ENCODING_H
|
||
VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list);
|
||
PRINTF_ARGS(void rb_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3);
|
- « Previous
- 1
- 2
- Next »