aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-20 15:05:10 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-20 15:09:23 +0900
commit2b2030f265e4ec0782de9c8dd9f8828a1a0af1b5 (patch)
tree7bfcd9b4fa53150626753f8c9e32c33571f73d58
parent7a94225e7d04f17ddd37433c3904b04fec97f281 (diff)
downloadruby-2b2030f265e4ec0782de9c8dd9f8828a1a0af1b5.tar.gz
Refined the warning message for $, and $;
[Bug #16438]
-rw-r--r--io.c2
-rw-r--r--string.c2
-rw-r--r--test/ruby/test_string.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/io.c b/io.c
index caef68c769..42528c0fd5 100644
--- a/io.c
+++ b/io.c
@@ -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;
}
diff --git a/string.c b/string.c
index 22ced326b8..d6fd73115b 100644
--- a/string.c
+++ b/string.c
@@ -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;
}
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index 0276d6a14d..09d099bb4a 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -1771,7 +1771,7 @@ CODE
begin
fs = $;
- assert_warn(/\$; will be deprecated/) {$; = " "}
+ assert_warn(/`\$;' is deprecated/) {$; = " "}
ensure
EnvUtil.suppress_warning {$; = fs}
end