This project is archived and is in readonly mode.
Eliminate Regexp test warnings
Reported by Jeffrey Hardy | August 26th, 2009 @ 07:56 PM
Subvert 'ambiguous first argument' warnings from RegexpExtAccessTests#test_multiline by using assert_equal.
Ruby warns when a Regexp literal with a modifier option is used as an argument to a method without parens.
$ ruby -vwe "puts //m"
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9]
-e:1: warning: ambiguous first argument; put parentheses or even spaces
(?m-ix:)
$ ruby -vwe "puts(//m)"
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9]
(?m-ix:)
Could also have parenthesized assert(), but that looks ugly.
Comments and changes to this ticket
-
Repository August 26th, 2009 @ 10:55 PM
- State changed from new to committed
(from [0821941598c214cb45f4d4373107102af1ccc777]) Eliminate warnings from Regexp multiline extension tests
[#3103 state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/0821941598c214cb45f4d437310710...
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
Attachments
Tags
Referenced by
- 3103 Eliminate Regexp test warnings [#3103 state:committed]