summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-09-12 21:22:59 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2019-09-12 21:22:59 +0900
commit231a1d68b061d80ac2ccdb7dd2e9637adb22692b (patch)
tree6e0e650bafde1081fb827fb58b74fe281ccd36e6 /src
parent6bbdb97e7533d1fcf2bc5a2a20b42d1c0e5a9bf3 (diff)
downloadmruby-231a1d68b061d80ac2ccdb7dd2e9637adb22692b.tar.gz
mruby-231a1d68b061d80ac2ccdb7dd2e9637adb22692b.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/string.c5
1 files changed, 2 insertions, 3 deletions
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 <code>String</code> with the given record separator removed
- * from the end of <i>str</i> (if present). If <code>$/</code> has not been
- * changed from the default Ruby record separator, then <code>chomp</code> also
- * removes carriage return characters (that is it will remove <code>\n</code>,
+ * from the end of <i>str</i> (if present). <code>chomp</code> also removes
+ * carriage return characters (that is it will remove <code>\n</code>,
* <code>\r</code>, and <code>\r\n</code>).
*
* "hello".chomp #=> "hello"