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.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

"ambiguous first argument" warning in `test/generators/scaffold_generator_test`

#4872

When running the scaffold_generator tests, I got a bunch of warnings:

./test/generators/scaffold_generator_test.rb:21: warning: ambiguous first argument; put parentheses or even spaces
./test/generators/scaffold_generator_test.rb:26: warning: ambiguous first argument; put parentheses or even spaces
./test/generators/scaffold_generator_test.rb:29: warning: ambiguous first argument; put parentheses or even spaces
./test/generators/scaffold_generator_test.rb:33: warning: ambiguous first argument; put parentheses or even spaces
./test/generators/scaffold_generator_test.rb:37: warning: ambiguous first argument; put parentheses or even spaces
./test/generators/scaffold_generator_test.rb:41: warning: ambiguous first argument; put parentheses or even spaces
./test/generators/scaffold_generator_test.rb:45: warning: ambiguous first argument; put parentheses or even spaces
./test/generators/scaffold_generator_test.rb:46: warning: ambiguous first argument; put parentheses or even spaces
./test/generators/scaffold_generator_test.rb:47: warning: ambiguous first argument; put parentheses or even spaces
./test/generators/scaffold_generator_test.rb:51: warning: ambiguous first argument; put parentheses or even spaces
./test/generators/scaffold_generator_test.rb:52: warning: ambiguous first argument; put parentheses or even spaces
./test/generators/scaffold_generator_test.rb:53: warning: ambiguous first argument; put parentheses or even spaces
./test/generators/scaffold_generator_test.rb:57: warning: ambiguous first argument; put parentheses or even spaces
./test/generators/scaffold_generator_test.rb:58: warning: ambiguous first argument; put parentheses or even spaces
./test/generators/scaffold_generator_test.rb:95: warning: ambiguous first argument; put parentheses or even spaces

I've included a patch (it's in the next message) that wraps all arguments of every assert_match in parentheses. :)

Reported by Jeff Kreeftmeijer · June 16th, 2010 @ 02:30 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Jeff Kreeftmeijer
  2. Jeff Kreeftmeijer
    Jeff Kreeftmeijer
    • Tag set to generators, patch, warnings

    June 16th, 2010 @ 02:32 PM

  3. Jeff Kreeftmeijer
    Jeff Kreeftmeijer

    I found this one while cleaning up my watched tickets and updated the patch to apply to master again. Here it is. :)

    September 9th, 2010 @ 05:52 PM

  4. Repository
    Repository
    • State changed from new to resolved

    (from [d82d98dcd53704a2d61463768f8690eaa5acfd2b]) got rid of the "ambiguous first argument; put parentheses or even spaces" warnings in the scaffold_generator tests [#4872 "ambiguous first argument" warning in `test/generators/scaffold_generator_test` state:resolved]

    Signed-off-by: Santiago Pastorino santiago@wyeworks.com
    http://github.com/rails/rails/commit/d82d98dcd53704a2d61463768f8690...

    September 24th, 2010 @ 08:18 PM

  5. Repository
    Repository

    (from [109c37b73f78c5b7b45e52599ff08674470cdc56]) got rid of the "ambiguous first argument; put parentheses or even spaces" warnings in the scaffold_generator tests [#4872 "ambiguous first argument" warning in `test/generators/scaffold_generator_test` state:resolved]

    Signed-off-by: Santiago Pastorino santiago@wyeworks.com
    http://github.com/rails/rails/commit/109c37b73f78c5b7b45e52599ff086...

    September 24th, 2010 @ 08:19 PM