[Bug:1.9] $? is not thread scope

1.9 e$B$G$Oe(B $? e$B$,%9%l%C%I%9%3!<%W$G$J$/$J$C$F$$$k$h$&$G$9!#e(B

e$B0J2<$N$h$&$K!"B>$N%9%l%C%I$GF0$+$7$?%3%^%s%I$N7k2L$,e(B $? e$B$KI=e(B
e$B$l$^$9!#e(B

% ./ruby -ve ’
t = Thread.new { system(“false”) }
p $?
t.join
p $?

ruby 1.9.0 (2008-07-09 revision 17977) [i686-linux]
false
#<Process::Status: pid 11679 exit 1>

1.8 e$B$G$Oe(B $? e$B$OJQ2=$7$^$;$s!#e(B

% ruby-1.8 -ve ’
t = Thread.new { system(“false”) }
p $?
t.join
p $?

ruby 1.8.7 (2008-07-10 revision 17572) [i686-linux]
nil
nil

e$B$"$H!"$D$$$G$K$$$&$H!"e(B1.9 e$B$G$Oe(B $? e$B$N=i4|CM$,e(B 1.8
e$B$H0[$J$je(B
false e$B$G$9!#e(B

e$B%A%1%C%He(B #251 e$B$,99?7$5$l$^$7$?!#e(B (by Anonymous)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r17981.

http://redmine.ruby-lang.org/issues/show/251

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs