[#6660] Ruby on Neko ? — Nicolas Cannasse <ncannasse@...>

Hi folks,

14 messages 2005/11/19

[#6672] testing for hardlink with "test(?-, ...)" flawed on Windows — noreply@...

Bugs item #2858, was opened at 2005-11-20 16:35

13 messages 2005/11/20

[#6684] semenatics of if/unless/while statement modifiers — Stefan Kaes <skaes@...>

Hi all,

81 messages 2005/11/21
[#6685] Re: semenatics of if/unless/while statement modifiers — Mauricio Fern疣dez <mfp@...> 2005/11/22

On Tue, Nov 22, 2005 at 08:22:59AM +0900, Stefan Kaes wrote:

[#6686] Re: semenatics of if/unless/while statement modifiers — Stefan Kaes <skaes@...> 2005/11/22

Mauricio Fern疣dez wrote:

[#6687] Re: semenatics of if/unless/while statement modifiers — Eric Hodel <drbrain@...7.net> 2005/11/22

On Nov 21, 2005, at 4:37 PM, Stefan Kaes wrote:

[#6689] Re: semenatics of if/unless/while statement modifiers — Stefan Kaes <skaes@...> 2005/11/22

Eric Hodel wrote:

[#6693] Re: semenatics of if/unless/while statement modifiers — Yukihiro Matsumoto <matz@...> 2005/11/22

Hi,

[#6695] Re: semenatics of if/unless/while statement modifiers — Stefan Kaes <skaes@...> 2005/11/22

Yukihiro Matsumoto wrote:

[#6718] Re: semenatics of if/unless/while statement modifiers — mathew <meta@...> 2005/11/22

[#6722] Re: semenatics of if/unless/while statement modifiers — Stefan Kaes <skaes@...> 2005/11/22

mathew wrote:

[#6707] Re: semenatics of if/unless/while statement modifiers — "David A. Black" <dblack@...> 2005/11/22

Hi --

[#6708] Re: semenatics of if/unless/while statement modifiers — Stefan Kaes <skaes@...> 2005/11/22

David A. Black wrote:

[#6714] Re: semenatics of if/unless/while statement modifiers — "David A. Black" <dblack@...> 2005/11/22

Hi --

[#6717] Re: semenatics of if/unless/while statement modifiers — Stefan Kaes <skaes@...> 2005/11/22

David A. Black wrote:

[#6798] ruby 1.8.4 preview2 — Yukihiro Matsumoto <matz@...>

Hi,

37 messages 2005/11/30

Stack trace consumes information. patch...

From: Hugh Sasse <hgs@...>
Date: 2005-11-04 19:45:03 UTC
List: ruby-core #6572
I have just had output like this from rails:

/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/connection_adapters/mysql_adapter.rb:119:in `query': Duplicate entry '"00149246       "' for key 2 (Mysql::Error)
        from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/connection_adapters/mysql_adapter.rb:119:in `execute'
        from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/connection_adapters/mysql_adapter.rb:113:in `insert'
        from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:1155:in `create_without_callbacks'
        from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/callbacks.rb:261:in `create_without_timestamps'
        from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/timestamp.rb:30:in `create'
        from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:1139:in `create_or_update_without_callbacks'
        from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/callbacks.rb:249:in `create_or_update'
        from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:965:in `save_without_validation'
         ... 9 levels...
        from /usr/local/lib/ruby/1.8/open-uri.rb:87:in `open'
        from populate_tables2.rb:247:in `initialize'
        from populate_tables2.rb:461:in `new'
        from populate_tables2.rb:461
neelix hgs 13 %>

In those missing 9 levels is the information I need about where my
call to the library was.  I.e. that would tell me which table I was
accessing at the time.

The attached patch puts #ifndef...#endif around the definitions for
TRACE_HEAD and TRACE_TAIL, to give people the option of adding

 -DTRACE_TAIL=40 -DTRACE_HEAD=20

to CPPFLAGS and recompiling ruby if they should wish.

Since these are not defined anywhere else it should not break any
code.

It's untested, but I thought I'd post here to see if it is rejected
outright, before testing it thoroughly...

        Thank you,
        Hugh

Attachments (1)

eval_patch (374 Bytes, text/plain)
--- eval.c	2005-11-02 11:33:18.857280000 +0000
+++ new_eval.c	2005-11-04 19:17:55.551118000 +0000
@@ -1253,8 +1253,12 @@
 	struct RArray *ep = RARRAY(errat);
 
 #define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5)
+#ifndef TRACE_HEAD
 #define TRACE_HEAD 8
+#endif
+#ifndef TRACE_TAIL
 #define TRACE_TAIL 5
+#endif
 
 	ep = RARRAY(errat);
 	for (i=1; i<ep->len; i++) {

In This Thread

Prev Next