Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Errors in ActiveSupport testsuite on 1.9.2-head

#4772

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 => http://pastie.org/992946


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


13) Error:
test_limit_should_not_break_on_blank_strings(MultibyteCharsExtrasTest):
SystemStackError: stack level too deep

Reported by Rohit Arondekar · June 5th, 2010 @ 01:47 PM

State: resolved
Milestone: 3.0.2
Assigned to: nobody
Importance: Low

Activity

  1. Rohit Arondekar
    Rohit Arondekar

    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]

    June 6th, 2010 @ 03:06 AM

  2. Rizwan Reza
    Rizwan Reza
    • Milestone cleared.
    • Tag set to actionpack
    • State changed from new to resolved

    June 6th, 2010 @ 09:28 AM

  3. Rohit Arondekar
    Rohit Arondekar

    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 => http://pastie.org/994401

    June 7th, 2010 @ 01:57 AM

  4. Ryan Bigg
    Ryan Bigg
    • State changed from resolved to open

    June 7th, 2010 @ 02:21 AM

  5. Rizwan Reza
    Rizwan Reza
    • No changes were found…

    June 7th, 2010 @ 02:39 AM

  6. Rizwan Reza
    Rizwan Reza
    • Tag changed from actionpack to activesupport, ruby-1.9.2

    June 7th, 2010 @ 02:40 AM

  7. Ryan Bigg
  8. Rizwan Reza
    Rizwan Reza
    • State changed from open to resolved

    June 8th, 2010 @ 04:06 AM

  9. Florian Aßmann
    Florian Aßmann

    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 = Module.new { def ==(other) self <=> other end }
      BrokenClass = Class.new { include BrokenComparable }
      BrokenClass.new == nil
    SystemStackError: stack level too deep
    

    The current implementation of the spaceship operator ...

    static VALUE
    rb_mod_cmp(VALUE mod, VALUE arg)
    {
        *snip*
        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.

    June 9th, 2010 @ 08:27 AM

  10. Luke van der Hoeven
    Luke van der Hoeven
    • Assigned user cleared.

    Fix/Hack: http://github.com/rails/rails/commit/0042f4166f783085eb909d69d542b5... actually seems to be breaking functionality. I get the following error when I try to run beta4 with the changes in the diff above: http://gist.github.com/431583

    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

    June 9th, 2010 @ 03:58 PM

  11. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to Low

    October 15th, 2010 @ 11:01 PM

  12. learn italian online
    learn italian online

    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.

    May 20th, 2011 @ 01:23 AM