From 8a7e0aaaef3b19f90d6debe6781e4b3031f56237 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 21 Jan 2020 08:37:44 +0900 Subject: Warn non-nil `$/` [Feature #14240] --- io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index e388e384c1..03209f752b 100644 --- a/io.c +++ b/io.c @@ -13288,8 +13288,8 @@ Init_IO(void) rb_gc_register_mark_object(rb_default_rs); rb_rs = rb_default_rs; rb_output_rs = Qnil; - rb_define_hooked_variable("$/", &rb_rs, 0, rb_str_setter); - rb_define_hooked_variable("$-0", &rb_rs, 0, rb_str_setter); + rb_define_hooked_variable("$/", &rb_rs, 0, deprecated_str_setter); + rb_define_hooked_variable("$-0", &rb_rs, 0, deprecated_str_setter); rb_define_hooked_variable("$\\", &rb_output_rs, 0, deprecated_str_setter); rb_define_virtual_variable("$_", get_LAST_READ_LINE, set_LAST_READ_LINE); -- cgit v1.2.3