From: mame@... Date: 2019-12-26T02:39:08+00:00 Subject: [ruby-dev:50902] [Ruby master Feature#14240] warn four special variables: $; $, $/ $\ Issue #14240 has been updated by mame (Yusuke Endoh). Target version set to 2.8 Assignee set to jeremyevans0 (Jeremy Evans) At the previous dev meeting, matz said that it should display a warning dynamically, i.e., not at the parsing time but when the variables are assigned. Variable aliases should be also warned. @jeremyevans0, could you please progress? ---------------------------------------- Feature #14240: warn four special variables: $; $, $/ $\ https://bugs.ruby-lang.org/issues/14240#change-83410 * Author: akr (Akira Tanaka) * Status: Open * Priority: Normal * Assignee: jeremyevans0 (Jeremy Evans) * Target version: 2.8 ---------------------------------------- I think the four special variables for separators should be deprecated. ``` $/ input record separator (default argument for "gets") $\ output record separator ("print" prints it at last) $, default separator for Array#join and print $; default separator for String#split ``` I feel many program doesn't work if they are set to non-default value. Since they are global, not thread local, we can not change these variables safely in a multi threaded program. So, I think we should warn them (and delete them in future). ---Files-------------------------------- warn-5-gvars.patch (2.31 KB) warn-5-gvars-v2.patch (5.44 KB) warn-5-gvars-v3.patch (5.4 KB) -- https://bugs.ruby-lang.org/