From 231a1d68b061d80ac2ccdb7dd2e9637adb22692b Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 12 Sep 2019 21:22:59 +0900 Subject: Remove `$/` from mruby implementation. 1. `$/` and other Perl-ish global variables are not defined in ISO. 2. The current Ruby policy do not encourage those variables. 3. Those variables has global effect and can cause troubles. --- src/string.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/string.c') diff --git a/src/string.c b/src/string.c index c1c28ee8b..35c7f8e7c 100644 --- a/src/string.c +++ b/src/string.c @@ -1529,9 +1529,8 @@ mrb_str_chomp_bang(mrb_state *mrb, mrb_value str) * str.chomp(separator="\n") => new_str * * Returns a new String with the given record separator removed - * from the end of str (if present). If $/ has not been - * changed from the default Ruby record separator, then chomp also - * removes carriage return characters (that is it will remove \n, + * from the end of str (if present). chomp also removes + * carriage return characters (that is it will remove \n, * \r, and \r\n). * * "hello".chomp #=> "hello" -- cgit v1.2.3