This project is archived and is in readonly mode.

#4772 ✓resolved
Rohit Arondekar

Errors in ActiveSupport testsuite on 1.9.2-head

Reported by Rohit Arondekar | June 5th, 2010 @ 01:47 PM | in 3.0.2

Running the actionpack tests in Rails master on 1.9.2-head gives 44 errors. The tests pass on 1.8.7.

Two types of errors are common which I have listed below. For all the errors I've created a pastie =>

3) Error:
TypeError: can't convert Hash into Integer

13) Error:
SystemStackError: stack level too deep

Comments and changes to this ticket

  • Rohit Arondekar

    Rohit Arondekar June 6th, 2010 @ 03:06 AM

    Upgrading to i18n 0.4.1 fixed 9 errors.

    However the stack too deep errors still remain. I suspect these are related to test/unit. The error is thrown by the assert methods. Version of Ruby => ruby 1.9.2dev (2010-06-06 revision 28184) [x86_64-linux]

  • Rizwan Reza

    Rizwan Reza June 6th, 2010 @ 09:28 AM

    • Milestone cleared.
    • Tag set to actionpack
    • State changed from “new” to “resolved”
  • Rohit Arondekar

    Rohit Arondekar June 7th, 2010 @ 01:57 AM

    That commit fixes 9 errors. 35 errors still remain and I think these are caused by test/unit. The error is thrown by the assert methods.

    Version of Ruby: ruby 1.9.2dev (2010-06-06 revision 28184)

    Pastie of errors =>

  • Ryan Bigg

    Ryan Bigg June 7th, 2010 @ 02:21 AM

    • State changed from “resolved” to “open”
  • Rizwan Reza

    Rizwan Reza June 7th, 2010 @ 02:39 AM

    • no changes were found...
  • Rizwan Reza

    Rizwan Reza June 7th, 2010 @ 02:40 AM

    • Tag changed from actionpack to activesupport, ruby-1.9.2
  • Ryan Bigg
  • Rizwan Reza

    Rizwan Reza June 8th, 2010 @ 04:06 AM

    • State changed from “open” to “resolved”
  • Florian Aßmann

    Florian Aßmann June 9th, 2010 @ 08:27 AM

    The problem is, imho, caused because of the way compar.c calls the spaceship:

    static VALUE
    cmp_eq(VALUE *a)
        VALUE c = rb_funcall(a[0], cmp, 1, a[1]);
    ruby-1.9.2-head >
      BrokenComparable = { def ==(other) self <=> other end }
      BrokenClass = { include BrokenComparable } == nil
    SystemStackError: stack level too deep

    The current implementation of the spaceship operator ...

    static VALUE
    rb_mod_cmp(VALUE mod, VALUE arg)
        cmp = rb_class_inherited_p(mod, arg);

    ... tries to lookup the method in the parent classes but fails because it's actually implemented in the Kernel module:

    ruby-1.9.2-head > Object.instance_methods(false)
     => [] 
    ruby-1.9.2-head > Object.superclass.instance_methods(false)
     => [:==, :equal?, :!, :!=, :instance_eval, :instance_exec, :__send__] 
    ruby-1.9.2-head > Object.superclass.superclass.methods(false)
     => [] 
    ruby-1.9.2-head > Object.superclass.superclass.class.instance_methods(false)
     => [:to_i, :to_f, :to_s, :to_a, :inspect, :&, :|, :^, :nil?, :to_r, :rationalize, :to_c] 
    ruby-1.9.2-head > Object.superclass.superclass.class.superclass.instance_methods(false)
     => [] 
    ruby-1.9.2-head > Object.superclass.superclass.class.superclass.superclass.instance_methods(false)
     => [:==, :equal?, :!, :!=, :instance_eval, :instance_exec, :__send__] 
    ruby-1.9.2-head > Kernel.instance_methods(false)
     => [:nil?, :===, :=~, :!~, :eql?, :hash, :<=>, :class, :singleton_class, :clone, :dup, :initialize_dup, :initialize_clone, :taint, :tainted?, :untaint, :untrust, :untrusted?, :trust, :freeze, :frozen?, :to_s, :inspect, :methods, :singleton_methods, :protected_methods, :private_methods, :public_methods, :instance_variables, :instance_variable_get, :instance_variable_set, :instance_variable_defined?, :instance_of?, :kind_of?, :is_a?, :tap, :send, :public_send, :respond_to?, :respond_to_missing?, :extend, :display, :method, :public_method, :define_singleton_method, :__id__, :object_id, :to_enum, :enum_for]

    But I'm neither familiar with C nor the ruby source so this is just a guess.

  • Luke van der Hoeven

    Luke van der Hoeven June 9th, 2010 @ 03:58 PM

    • Assigned user cleared.

    Fix/Hack: actually seems to be breaking functionality. I get the following error when I try to run beta4 with the changes in the diff above:

    Should the undef actually be added if we aren't really sure what it does or how it works? Especially if it break something here.

    Also, whats odd is if I call an action that doesn't rely on the comparator, and then revisit the offending action, it works fine.

    Side note, I am using ruby 1.9.1. Have not tested with 1.9.2

  • Jeremy Kemper

    Jeremy Kemper October 15th, 2010 @ 11:01 PM

    • Milestone set to 3.0.2
    • Importance changed from “” to “Low”
  • learn italian online

    learn italian online May 20th, 2011 @ 01:23 AM

    For learn italian online those of you that were fortunate enough to catch some or all of our video project – below learn a language is a breakdown of the films that were submitted. rosetta stone We were very impressed with the amount of submissions rosetta stone spanish – as well as their diversity and quality.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>