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

Refined the warning message for $, and $;

[Bug #16438]
This commit is contained in:
Nobuyoshi Nakada 2019-12-20 15:05:10 +09:00
parent 7a94225e7d
commit 2b2030f265
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
3 changed files with 3 additions and 3 deletions

2
io.c
View file

@ -7543,7 +7543,7 @@ rb_output_fs_setter(VALUE val, ID id, VALUE *var)
{
rb_str_setter(val, id, &val);
if (!NIL_P(val)) {
rb_warn("non-nil $, will be deprecated");
rb_warn_deprecated("`$,'", NULL);
}
*var = val;
}

View file

@ -10092,7 +10092,7 @@ rb_fs_setter(VALUE val, ID id, VALUE *var)
rb_id2str(id));
}
if (!NIL_P(val)) {
rb_warn("non-nil $; will be deprecated");
rb_warn_deprecated("`$;'", NULL);
}
*var = val;
}

View file

@ -1771,7 +1771,7 @@ CODE
begin
fs = $;
assert_warn(/\$; will be deprecated/) {$; = " "}
assert_warn(/`\$;' is deprecated/) {$; = " "}
ensure
EnvUtil.suppress_warning {$; = fs}
end