Hi,

>
> the bottom line: if you are to *ever* use $=, do it at the very beginning
> of the program, or don't do it. my guess for $= is that it's going to
> become deprecated in Ruby version 2 or 3; it's one of that kind of
> features.
>

I just wanted temporary insensitive string comparison without any side
effect
like following and wished 'true'.

cfg = {"content-type" => "text/html","encoding"=>"base64"} # managed by
another library
...
$= = true
p cfg['content-type']=='TEXT/HTML' && cfg['encoding']=='BASE64'
$= = false

But It prints 'false'
so I have to code

p cfg['content-type']=~/TEXT\/HTML/i && cfg['encoding']=~/BASE64/i

Or

a = cfg['content-type']
b = cfg['encoding']
$= = true
p a == 'TEXT/HTML' && b=='BASE64'
$= = false

Or

p (cfg['content-type'] && cfg['content-type'].upcase=='TEXT/HTML')
  && (cfg['encoding'] && cfg['encoding'].upcase=='BASE64'

Something not neat and efficient code, isn't it?


>
> Mathieu Bouchard
>

Park HeeSob