[Bug:1.9] Complex("1i") clear $~

e$BF1MM$K!"e(BComplex(“1i”) e$B$be(B $~ e$B$re(B nil
e$B$K$9$k$h$&$G$9!#e(B

% ./ruby -e ’
/a/ =~ “a”
p $~
p Complex(“1i”)
p $~’
#<MatchData “a”>
Complex(0, 1)
nil

e$B$A$J$_$Ke(B Complex(“i”) e$B$Oe(B ArgumentError
e$B$K$J$C$F$7$^$&$N$Ge(B 1i
e$B$H$7$^$7$?!#e(B

Issue #113 has been updated by Anonymous.

Status changed from Open to Closed
% Done changed from 0 to 100

Applied in changeset r17148.

Bug #113: Complex(“1i”) clear $~
http://redmine.ruby-lang.org/issues/show/113

Author: Anonymous
Status: Closed
Priority: Low
Assigned to: Yukihiro M.
Category:
Target version:

同様に、Complex(“1i”) ã‚‚ $~ ã‚’ nil にするようです。

% ./ruby -e ’
/a/ =~ “a”
p $~
p Complex(“1i”)
p $~’
#<MatchData “a”>
Complex(0, 1)
nil

ちなみに Complex(“i”) は ArgumentError になってしまうので 1i
としました。

[田中 哲][たなか あきら][Tanaka A.]