From: schneik@... Date: 2000-03-30T14:49:18-06:00 Subject: [ruby-talk:02279] Ruby Lang Ref Manual 1.4 Question: $= & is nil not false? Hi, In the Variables section, we have (nil): ============================================ $= The flag for case insensitive, nil by default. (Mnemonic: = is for comparison.) ============================================ In the String section, we have ((not) false): ============================================ self == other self > other self >= other self < other self <= other String comparison. If the value of the variable $= is not false, comparison done by case-insensitive. ============================================ I just want to be sure that this is the same as saying "If the value ... is not nil, ....". ==== new question ==== I have a more general question about the use of global variables such as $=, $/, $\, and the like: Is there any way that you can protect yourself from your own code or from other library/extension classes/modules that might change one of these and not reset it (due to simple forgetfulness, or some sort of exception, and so on)? It might be nice to have standard but automagically localized versions of these variables, perhaps $$=, $$/, $$\, and so on, that would locally over-ride their global counterparts. Perhaps then Ruby strict compile mode could prohibit you from changing the global control variables, but allow the use of the localized control variables. (I distinguish $ "control variables" from $1, $&, and other sorts of $ "return value" variables.) Conrad Schneiker (This note is unofficial and subject to improvement without notice.)