[#50898] DBMモジュールが使うバックエンドをrubyをビルドする際に指定する方法について — Yasuhiro KIMURA <yasu@...>
5pyo5p2R44Go55Sz44GX44G+44GZ44CCDQpydWJ5LWxpc3TjgajjganjgaHjgonjgaflsIvjga3j
3 messages
2019/12/20
[ruby-dev:50902] [Ruby master Feature#14240] warn four special variables: $; $, $/ $\
From:
mame@...
Date:
2019-12-26 02:39:08 UTC
List:
ruby-dev #50902
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/