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.

Eliminate Regexp test warnings

#3103

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.

Reported by Jeffrey Hardy · August 26th, 2009 @ 07:56 PM

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

Activity

  1. Repository
    Repository
    • State changed from new to committed

    (from [0821941598c214cb45f4d4373107102af1ccc777]) Eliminate warnings from Regexp multiline extension tests

    [#3103 Eliminate Regexp test warnings state:committed]

    Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
    http://github.com/rails/rails/commit/0821941598c214cb45f4d437310710...

    August 26th, 2009 @ 10:55 PM