Re:JRuby 9000 released
by infraruby on Wednesday July 22, 2015 @04:50PM
(#9932223)
$~ and friends are not global:
def f
p $~ # => nil
"123" =~ /\w+/
p $~ # => #<MatchData "123">
end
p $~ # => nil
"abc" =~ /\w+/
p $~ # => #<MatchData "abc">
f
p $~ # => #<MatchData "abc">
Re:JRuby 9000 released
by headius on Wednesday July 22, 2015 @05:45PM
(#9932538)
Matz himself has said he regrets putting these variables in the language, and some day they may disappear. We'll match behavior as much as possible, but they're a relic no matter how you slice it.