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.

[PATCH] actionpack route_set tests failing on ruby1.9.1p376

#3715

santiago@debian:~/Documentos/WyeWorks/Proys/rails/actionpack$ rake test
(in /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack)
/home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/route_set.rb:144:in `module_eval': /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/route_set.rb:145: syntax error, unexpected '[', expecting ';' or '\n' (SyntaxError)
              def hash_for_[:projects]s_url(options = nil...
                            ^
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/route_set.rb:144:in `define_hash_access'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/route_set.rb:135:in `block in define_named_route_methods'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/route_set.rb:133:in `each'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/route_set.rb:133:in `define_named_route_methods'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/route_set.rb:84:in `add'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/route_set.rb:317:in `add_route'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:177:in `match'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:305:in `match'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:584:in `match'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:560:in `match'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:229:in `map_method'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:184:in `get'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:489:in `block (3 levels) in resources'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:617:in `with_scope_level'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:488:in `block (2 levels) in resources'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:617:in `with_scope_level'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:485:in `block in resources'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:270:in `scope'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:484:in `resources'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:470:in `block in resources'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:270:in `scope'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:469:in `resources'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/test/dispatch/routing_test.rb:56:in `block (3 levels) in '
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/mapper.rb:270:in `scope'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/test/dispatch/routing_test.rb:55:in `block (2 levels) in '
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/route_set.rb:249:in `instance_exec'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/lib/action_dispatch/routing/route_set.rb:249:in `draw'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/test/dispatch/routing_test.rb:17:in `block in '
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/test/abstract_unit.rb:116:in `stub_controllers'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/test/dispatch/routing_test.rb:15:in `'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/actionpack/test/dispatch/routing_test.rb:4:in `'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/activesupport/lib/active_support/dependencies.rb:156:in `load'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/activesupport/lib/active_support/dependencies.rb:156:in `block in load_with_new_constant_marking'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/activesupport/lib/active_support/dependencies.rb:537:in `new_constants_in'
    from /home/santiago/Documentos/WyeWorks/Proys/rails/activesupport/lib/active_support/dependencies.rb:156:in `load_with_new_constant_marking'
    from /usr/lib/ruby1.9.1/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `block in '
    from /usr/lib/ruby1.9.1/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
    from /usr/lib/ruby1.9.1/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `'
rake aborted!
Command failed with status (1): [/usr/bin/ruby1.9.1 -I"lib:test" "/usr/lib/...]

(See full trace by running task with --trace)

Reported by Santiago Pastorino · January 16th, 2010 @ 10:42 PM

State: resolved
Milestone: 3.0.2
Assigned to: José Valim José Valim
Importance: High

Activity

  1. José Valim
    José Valim
    • Assigned user set to josh

    January 16th, 2010 @ 10:45 PM

  2. Michael Koziarski
  3. josh
    josh
    • State changed from new to open
    • Milestone cleared.

    January 16th, 2010 @ 10:52 PM

  4. Ryan Bigg
    Ryan Bigg

    Here's a patch that fixes this issue. There may be a better way to do this.

    January 16th, 2010 @ 11:53 PM

  5. Santiago Pastorino
    Santiago Pastorino

    Here is a more idiomatic version

    January 17th, 2010 @ 12:12 AM

  6. Ryan Bigg
    Ryan Bigg

    +1 to Santiago's patch, it makes more sense.

    We have benchmarked the performance differences between respond_to? and is_a? and they are negligible.

    January 17th, 2010 @ 06:03 AM

  7. Rizwan Reza
    Rizwan Reza

    +1 verified. This patch applies cleanly on master.

    January 17th, 2010 @ 07:44 AM

  8. Rizwan Reza
    Rizwan Reza
    • Tag changed from actionpack, routing, tests to 3.0, actionpack, routing, tests
    • Title changed from actionpack route_set tests failing on ruby1.9.1p376 to [PATCH] actionpack route_set tests failing on ruby1.9.1p376

    January 17th, 2010 @ 07:45 AM

  9. José Valim
    José Valim
    • Assigned user changed from josh to José Valim

    Sorry, but the patch is invalid. We are not supposed to receive an array there, I will investigate why we are receiving an array there and fix it.

    January 17th, 2010 @ 03:09 PM

  10. Repository
  11. José Valim
    José Valim
    • State changed from open to resolved

    January 17th, 2010 @ 03:19 PM

  12. Lenary
    Lenary

    i think radar has a list of some diagnostics he did and it showed three different kinds of data he got out of it. symbols, arrays and strings. maybe all the arrays were one dimensional, but i forget. you'll need to ask him for it

    January 17th, 2010 @ 03:20 PM

  13. Lenary
    Lenary

    i think radar has a list of some diagnostics he did and it showed three different kinds of data he got out of it. symbols, arrays and strings. maybe all the arrays were one dimensional, but i forget. you'll need to ask him for it

    January 17th, 2010 @ 03:20 PM

  14. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to High

    October 15th, 2010 @ 11:01 PM