[#5219] Segmentation fault in timeout.rb — Michel Pastor <K@...>

Hi,

18 messages 2005/06/16
[#5220] Re: Segmentation fault in timeout.rb — Eric Hodel <drbrain@...7.net> 2005/06/16

[#5221] Re: Segmentation fault in timeout.rb — Michel Pastor <K@...> 2005/06/16

On Fri, 17 Jun 2005 05:03:18 +0900

[#5223] Re: Segmentation fault in timeout.rb — nobu.nokada@... 2005/06/17

Hi,

[#5296] Subversion — Shugo Maeda <shugo@...>

Hi,

64 messages 2005/06/30
[#5297] Re: Subversion — Curt Hibbs <curt@...> 2005/06/30

Shugo Maeda wrote:

[#5298] Re: Subversion — Nikolai Weibull <mailing-lists.ruby-core@...> 2005/06/30

Curt Hibbs wrote:

[#5301] Re: Subversion — Austin Ziegler <halostatue@...> 2005/06/30

On 6/30/05, Nikolai Weibull

[#5304] Re: Subversion — Nikolai Weibull <mailing-lists.ruby-core@...> 2005/06/30

Austin Ziegler wrote:

[#5305] Re: Subversion — Austin Ziegler <halostatue@...> 2005/06/30

On 6/30/05, Nikolai Weibull

[#5307] Re: Subversion — mathew <meta@...> 2005/06/30

Austin Ziegler wrote:

[#5308] Re: Subversion — Austin Ziegler <halostatue@...> 2005/06/30

On 6/30/05, mathew <meta@pobox.com> wrote:

[#5311] Re: Subversion — mathew <meta@...> 2005/07/01

Austin Ziegler wrote:

[#5323] Re: Subversion — Austin Ziegler <halostatue@...> 2005/07/01

On 7/1/05, mathew <meta@pobox.com> wrote:

[#5325] Re: Subversion — Nikolai Weibull <mailing-lists.ruby-core@...> 2005/07/01

Austin Ziegler wrote:

Re: event_hook shows weirdness when invoked on mixed in methods

From: Shugo Maeda <shugo@...>
Date: 2005-06-17 10:12:43 UTC
List: ruby-core #5235
Hi,

Ryan Davis wrote:
> The following attachment, when run, shows the following behavior:
> 
>> % ruby -v ./add_event_hook_weirdness.rb
>> ruby 1.8.3 (2005-06-17) [powerpc-darwin8.1.0]
>> ./add_event_hook_weirdness.rb:620:in `hash': undefined method  `hash'
>> for #<MyMod:0x32c0c4> (NoMethodError)
>>     from ./add_event_hook_weirdness.rb:620:in `y'
>>     from ./add_event_hook_weirdness.rb:626
>>     from ./add_event_hook_weirdness.rb:625:in `times'
>>     from ./add_event_hook_weirdness.rb:625

Please apply this patch.

--- add_event_hook_weirdness.rb.orig    2005-06-17 19:10:25.055358488 +0900
+++ add_event_hook_weirdness.rb 2005-06-17 19:10:43.776512440 +0900
@@ -579,6 +579,14 @@
         {
           VALUE signature;

+          if (klass) {
+            if (TYPE(klass) == T_ICLASS) {
+                klass = RBASIC(klass)->klass;
+            }
+            else if (FL_TEST(klass, FL_SINGLETON)) {
+                klass = self;
+            }
+          }
           signature = rb_ary_new2(2);
           rb_ary_store(signature, 0, klass);
           rb_ary_store(signature, 1, ID2SYM(mid));


Maybe, EXEC_EVENT_HOOK() should do this.

Shugo

In This Thread