From: Johan Holmberg Date: 2004-11-20T01:48:24+09:00 Subject: [PATCH] Nicer traceback at Interrupt When Ruby is interrupted by for example Ctrl-C, the traceback looks something like: > ~/ruby/installs/latest-mainline/bin/ruby ~/loop.rb ^C/home/holmberg/loop.rb:14:in `loop': Interrupt from /home/holmberg/loop.rb:14:in `ccc' from /home/holmberg/loop.rb:7:in `bbb' from /home/holmberg/loop.rb:3:in `aaa' from /home/holmberg/loop.rb:18 There seems to be a "\n" missing. Then it would look like: > ./ruby ~/loop.rb ^C/home/holmberg/loop.rb:14:in `loop': Interrupt from /home/holmberg/loop.rb:14:in `ccc' from /home/holmberg/loop.rb:7:in `bbb' from /home/holmberg/loop.rb:3:in `aaa' from /home/holmberg/loop.rb:18 Isn't this the intended layout? Below is a patch making this change. I'm not sure if the patch is made the right way, or if some other case are still missnig, but the effect in this case seem right. /Johan Holmberg -------------------------------------------------------------------- Index: eval.c =================================================================== RCS file: /src/ruby/eval.c,v retrieving revision 1.731 diff -u -r1.731 eval.c --- eval.c 17 Nov 2004 02:27:37 -0000 1.731 +++ eval.c 19 Nov 2004 16:37:34 -0000 @@ -1148,6 +1148,7 @@ if (elen == 0) { warn_print(": "); warn_print2(RSTRING(epath)->ptr, RSTRING(epath)->len); + warn_print("\n"); } else { char *tail = 0; --------------------------------------------------------------------