[#3726] Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...>

Hi --

15 messages 2004/11/12
[#3749] Re: Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...> 2004/11/16

Hi --

[#3751] Re: Fixnum#clone and Float#clone raise different exceptions — Yukihiro Matsumoto <matz@...> 2004/11/16

Hi,

[#3752] Re: Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...> 2004/11/16

Hi --

[#3785] The latest 1.8.2 cvs prints parse error when starting extension compiling — Yukihiro Matsumoto <matz@...>

Hi,

13 messages 2004/11/23
[#3787] Re: The latest 1.8.2 cvs prints parse error when starting extension compiling — Johan Holmberg <holmberg@...> 2004/11/23

[PATCH] Nicer traceback at Interrupt

From: Johan Holmberg <holmberg@...>
Date: 2004-11-19 16:48:24 UTC
List: ruby-core #3774
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;
--------------------------------------------------------------------


In This Thread

Prev Next