On Jul 15, 5:57 am, Marnen Laibow-Koser <rails-mailing-l...@andreas-
s.net> wrote:
>
> Since this doesn't seem to be a Rails issue, you will probably have
> better luck attracting the attention of the Ruby core team if you post
> to the Ruby list.  Good luck!

You are of course right, Marnen. But for the unlikely case that anyone
else stumbles over this: starting with r24054 (1.9.1-p218) everything
works as expected again.

Apparently it was an issue with ActiveRecord::Base redefining
respond_to? as r24054 is a result of this bug report:
http://redmine.ruby-lang.org/issues/show/1723

For those interested, I reproduced the corresponding change below.

Best,
Niels

--- vm_insnhelper.c     (revision
24053)
+++ vm_insnhelper.c     (revision
24054)
@@ -761,7 +761,7
@@
     int
i;
     int argc =
orig_argc;
     const int m = iseq-
>argc;
-    VALUE
ary;
+    VALUE ary,
arg0;
     int opt_pc =
0;

     th->mark_stack_len =
argc;
@@ -771,15 +771,19
@@
      *  => {|a|} => a = [1,
2]
      *  => {|a, b|} => a, b = [1,
2]
 
*/
+    arg0 = argv
[0];
     if (!(iseq->arg_simple & 0x02) &&          /* exclude {|a|}
*/
             (m + iseq->arg_post_len) > 0 &&    /* this process is
meaningful
*/
-            argc == 1 && !NIL_P(ary = rb_check_array_type(argv[0])))
{ /* rhs is only an array
*/
+            argc == 1 && !NIL_P(ary = rb_check_array_type(arg0))) { /
* rhs is only an array
*/
         th->mark_stack_len = argc = RARRAY_LEN
(ary);

         CHECK_STACK_OVERFLOW(th->cfp,
argc);

         MEMCPY(argv, RARRAY_PTR(ary), VALUE,
argc);
     }
+    else
{
+        argv[0] =
arg0;
+    }

     for (i=argc; i<m; i++)
{
         argv[i] =
Qnil;

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to