Bug #1954: line number 0?
http://redmine.ruby-lang.org/issues/show/1954
e$B5/I<<Te(B: Kazuhiro NISHIYAMA
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
e$B%+%F%4%je(B: core
ruby -v: ruby 1.9.2dev (2009-08-18 trunk 24578) [i686-linux]
$DEBUG = true e$B$N;~$K=P$F$/$kNc30H/@80LCV$N9THV9f$,e(B 0
e$B$K$J$C$F$7$^$&$3$H$,$"$k$h$&$G$9!#e(B
% cat t0.rb
$DEBUG = true
Thread.start do
begin
Process.kill(:INT, $$)
ensure
raise
end
end.join
% ruby-trunk t0.rb
Exception Interrupt' at t0.rb:2 - Exception
RuntimeError’ at t0.rb:6 -
Exception RuntimeError' at t0.rb:0 - t0.rb:2:in
join’: Interrupt
from t0.rb:2:in `’
% ruby-trunk -v
ruby 1.9.2dev (2009-08-18 trunk 24578) [i686-linux]
%
e$B%A%1%C%He(B #1954 e$B$,99?7$5$l$^$7$?!#e(B (by Roger P.)
Is this still the case, at all?
-r
http://redmine.ruby-lang.org/issues/show/1954
e$B%A%1%C%He(B #1954 e$B$,99?7$5$l$^$7$?!#e(B (by Kazuhiro NISHIYAMA)
e$B$^$@:F8=$7$^$9!#e(B
e$BB>$N4D6-$G$b:F8=$9$k$+3N$+$a$d$9$/$9$k$?$a!"e(B r26244
e$B$G%F%9%H$rDI2C$7$^$7$?!#e(B
e$BB>$N%P!<%8%g%s$H5sF0$rHf$Y$F$_$k$He(B
- REE: “in ensure” e$B$,=P$F$3$J$$e(B
- 1.9.1: :0
- trunk: t1.rb:0
- 1.9.1e$B$He(Btrunk: t1.rb:2 e$B$,e(B start e$B$G$O$J$/e(B join
e$B$K$J$C$F$$$ke(B
e$B$H$$$&$H$3$m$,$*$+$7$$$h$&$K8+$($^$9!#e(B
% cat t1.rb
$DEBUG = true
Thread.start do
begin
Process.kill(:INT, $$)
ensure
raise “in ensure”
end
end.join
% ruby-1.8.6 -v t1.rb
ruby 1.8.6 (2009-08-26 patchlevel 387) [x86_64-linux]
Exception Interrupt' at t1.rb:2 - Exception
RuntimeError’ at t1.rb:6 - in ensure
t1.rb:2:in `start’: Interrupt
from t1.rb:2
% ruby-1.8.7 -v t1.rb
ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux]
Exception Interrupt' at t1.rb:2 - Exception
RuntimeError’ at t1.rb:6 - in ensure
t1.rb:2:in `start’: Interrupt
from t1.rb:2
% ruby18 -v t1.rb
ruby 1.8.8dev (2010-01-01 revision 26226) [x86_64-linux]
Exception Interrupt' at t1.rb:2 - Exception
RuntimeError’ at t1.rb:6 - in ensure
t1.rb:2:in `start’: Interrupt
from t1.rb:2
% ruby -v t1.rb
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux], MBARI 0x6770,
Ruby Enterprise Edition 2009.10
Exception Interrupt' at t1.rb:2 - t1.rb:2:in
start’: Interrupt
from t1.rb:2
% ruby-1.9.1 -v t1.rb
ruby 1.9.1p376 (2009-12-07 revision 26040) [x86_64-linux]
Exception Interrupt' at t1.rb:2 - Exception
RuntimeError’ at t1.rb:6 - in ensure
Exception RuntimeError' at <main>:0 - in ensure t1.rb:2:in
join’: Interrupt
from t1.rb:2:in `’
% ruby-trunk -v t1.rb
ruby 1.9.2dev (2010-01-05 trunk 26241) [x86_64-linux]
Exception Interrupt' at t1.rb:2 - Exception
RuntimeError’ at t1.rb:6 - in ensure
Exception RuntimeError' at t1.rb:0 - in ensure t1.rb:2:in
join’: Interrupt
from t1.rb:2:in `’
%
http://redmine.ruby-lang.org/issues/show/1954
e$B%A%1%C%He(B #1954 e$B$,99?7$5$l$^$7$?!#e(B (by _ wanabe)
e$B$3$N8=>]$K$D$$$FD4$Y$F8+$^$7$?!#$9$_$^$;$s!"$&$^$/E;$a$i$l$:D9$$@bL@$K$J$j$^$9!#e(B
e$B$^$:$O$8$a$K!"%7%0%J%k$r=hM}$9$k%9%l%C%I$Oe(B 1.8
e$B$G$O%+%l%s%H!“e(B1.9 e$B$G$O%a%$%s$H0[$J$C$F$$$^$9!#e(B
e$B$3$N$?$a!“e(B> start e$B$G$O$J$/e(B join
e$B$K$J$C$F$$$k!!$NItJ,$O;EMMJQ99$K$h$k$b$N$H9M$($i$l$^$9!#e(B
e$B!J9THV9f$Oe(B 6
e$B$N$[$&$,?F@Z$J5$$b$7$^$9$,!”$H$j$”$($:K%A%1%C%H$H$OL54X78$H9M$($^$9!Ke(B
e$B$=$l$+$i0lHV$NLdBj$G$“$k9THV9f$,e(B 0 e$B$K$J$k8=>]$K$D$$$F$G$9!#e(B
Ruby e$B%W%m%;%9$,=N;$9$k$H$-$K$O!“;R%9%l%C%I3F!9$Ne(B ensure
e$B@a$r<B9T$7$^$9$,e(B
e$B$3$NCf$G$5$i$KNc30$,H/@8$9$k$He(B $DEBUG = true
e$B$J$i$P%a%$%s%9%l%C%I$^$GEAGE$5$;$h$&$H$7$^$9!#e(B
e$B$7$+$7%a%$%s%9%l%C%I$O$9$G$K%/%j!<%s%”%C%W=hM}Cf$G!"%H%C%W%U%l!<%`0J30$O@Q$^$l$F$$i$:e(B
e$B$=$N$?$a$K9THV9f$,e(B 0 e$B$HH=CG$5$l$k!”$H$$$&$3$H$N$h$&$G$7$?!#e(B
e$BBP:v$H$7$Fe(B
e$B!&$=$&$$$&$b$N$H$7$F3d$j@Z$k!J;EMMJQ99$H$9$k!Ke(B
e$B!&%W%m%;%9=*N;=hM}Cf$N%a%$%s%9%l%C%I$G$NNc30$OI=<($7$J$$e(B
e$B!&%W%m%;%9=*N;=hM}Cf$O%a%$%s%9%l%C%I$XNc30$rEAGE$5$;$J$$e(B
e$B!&%H%C%W%U%l!<%`$G$NNc30$OI=<($7$J$$e(B
e$B$H$$$C$?$b$N$r9M$($^$7$?$,!"$I$&$9$k$N$,:GE,$+$O;d$K$O$o$+$j$^$;$s!#e(B
http://redmine.ruby-lang.org/issues/show/1954
e$B%A%1%C%He(B #1954 e$B$,99?7$5$l$^$7$?!#e(B (by Roger P.)
looks like it’s still erring
http://redmine.ruby-lang.org/issues/show/1954
e$B%A%1%C%He(B #1954 e$B$,99?7$5$l$^$7$?!#e(B (by Yusuke E.)
e$B%9%F!<%?%9e(B Assignede$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B
This issue was solved with changeset r26817.
Kazuhiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
http://redmine.ruby-lang.org/issues/show/1954
e$B%A%1%C%He(B #1954 e$B$,99?7$5$l$^$7$?!#e(B (by Yusuke E.)
e$B1sF#$G$9!#e(B
e$B$3$N8=>]$K$D$$$FD4$Y$F8+$^$7$?!#e(B
e$B$"$j$,$H$&$4$6$$$^$9!#e(B
e$BBP:v$H$7$Fe(B
e$B!&$=$&$$$&$b$N$H$7$F3d$j@Z$k!J;EMMJQ99$H$9$k!Ke(B
e$B!&%W%m%;%9=*N;=hM}Cf$N%a%$%s%9%l%C%I$G$NNc30$OI=<($7$J$$e(B
e$B!&%W%m%;%9=*N;=hM}Cf$O%a%$%s%9%l%C%I$XNc30$rEAGE$5$;$J$$e(B
e$B!&%H%C%W%U%l!<%`$G$NNc30$OI=<($7$J$$e(B
e$B$H$$$C$?$b$N$r9M$($^$7$?$,!"$I$&$9$k$N$,:GE,$+$O;d$K$O$o$+$j$^$;$s!#e(B
e$B8D?ME*$K$O$I$l$G$b$$$$$H;W$$$^$9!#e(B
e$BJL$N8uJd$H$7$F!“e(B0
e$B$@$C$?$i9THV9f$@$1>JN,$9$k%Q%C%A$r=q$$$F$_$^$7$?!#e(B
e$B?5=E$5$rMW$9$k7|0F$G$O$J$$$H;W$&$N$G!”$5$C$5$HD>$7$F$7$^$$$?$$$H;W$$$^$9!#e(B
$ git diff eval.c
diff --git a/eval.c b/eval.c
index 6deed9c…a1deab6 100644
— a/eval.c
+++ b/eval.c
@@ -394,11 +394,16 @@ setup_exception(rb_thread_t *th, int tag, volatile
VALUE mesg)
PUSH_TAG();
if ((status = EXEC_TAG()) == 0) {
RB_GC_GUARD(e) = rb_obj_as_string(e);
-
if (file && line) {
warn_printf("Exception `%s' at %s:%d - %s\n",
rb_obj_classname(th->errinfo),
file, line, RSTRING_PTR(e));
}
-
else if (file) {
-
warn_printf("Exception `%s' at %s - %s\n",
-
rb_obj_classname(th->errinfo),
-
file, RSTRING_PTR(e));
-
}
else {
warn_printf("Exception `%s' - %s\n",
rb_obj_classname(th->errinfo),
$ cat t.rb
$DEBUG = true
Thread.start do
begin
Process.kill(:INT, $$)
ensure
raise
end
end.join
$ ./miniruby t.rb
Exception Interrupt' at t.rb:2 - Exception
RuntimeError’ at t.rb:6 -
Exception RuntimeError' at t.rb - t.rb:2:in
join’: Interrupt
from t.rb:2:in `’
http://redmine.ruby-lang.org/issues/show/1954