aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/string.c b/string.c
index 153fcc59b7..386c460740 100644
--- a/string.c
+++ b/string.c
@@ -7793,6 +7793,9 @@ rb_str_split_m(int argc, VALUE *argv, VALUE str)
else if (!(spat = rb_fs_check(spat))) {
rb_raise(rb_eTypeError, "value of $; must be String or Regexp");
}
+ else {
+ rb_warn("$; is set to non-nil value");
+ }
if (split_type != awk) {
if (BUILTIN_TYPE(spat) == T_STRING) {
rb_encoding *enc2 = STR_ENC_GET(spat);
@@ -9918,6 +9921,9 @@ rb_fs_setter(VALUE val, ID id, VALUE *var)
"value of %"PRIsVALUE" must be String or Regexp",
rb_id2str(id));
}
+ if (!NIL_P(val)) {
+ rb_warn("non-nil $; will be deprecated");
+ }
*var = val;
}