diff options
author | Akira Matsuda <ronnie@dio.jp> | 2011-05-18 20:37:57 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2011-05-18 23:20:19 +0900 |
commit | cce461511bde8f86aa6f82775320070ccc688273 (patch) | |
tree | 9fdee4f56bee252783bc1631ca9028d00e6d0aef /railties/test/generators/actions_test.rb | |
parent | 32b9cefb637741ac7158085790cda56360a229f2 (diff) | |
download | rails-cce461511bde8f86aa6f82775320070ccc688273.tar.gz rails-cce461511bde8f86aa6f82775320070ccc688273.tar.bz2 rails-cce461511bde8f86aa6f82775320070ccc688273.zip |
be sure to parenthesize the arguments when the first one is a RegExp literal
this fixes: "warning: ambiguous first argument; put parentheses or even spaces"
because: you need this to tell the parser that you're not calling :/ method (division)
details (Japanese!): http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/42445?42370-43277
Diffstat (limited to 'railties/test/generators/actions_test.rb')
-rw-r--r-- | railties/test/generators/actions_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb index 68d4c17623..597746c4aa 100644 --- a/railties/test/generators/actions_test.rb +++ b/railties/test/generators/actions_test.rb @@ -118,8 +118,8 @@ class ActionsTest < Rails::Generators::TestCase end assert_file 'config/application.rb' do |content| - assert_match /# This will be added/, content - assert_no_match /# This wont be added/, content + assert_match(/# This will be added/, content) + assert_no_match(/# This wont be added/, content) end end |