This project is archived and is in readonly mode.

#4872 ✓resolved
Jeff Kreeftmeijer

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

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

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. :)

Comments and changes to this ticket

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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Referenced by

Pages