Project

General

Profile

Bug #3225

lib/uri/mailto.rb slightly wrong regexp

Added by marcandre (Marc-Andre Lafortune) over 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 1.9.2dev (2010-04-30 trunk 27554) [x86_64-darwin10.3.0]
Backport:
[ruby-core:29894]

Description

=begin
Looking for example of the 3rd parameter of value 'N' for Regexp.new, I noticed in lib/uri/mailto.rb

HEADER_REGEXP = Regexp.new(HEADER_PATTERN, 'N').freeze

Unless I'm mistaken, the 'N' in second position is simply a flag for case insensitivity, but HEADER_PATTERN already is, so it should either be

HEADER_REGEXP = Regexp.new(HEADER_PATTERN).freeze

or

HEADER_REGEXP = Regexp.new(HEADER_PATTERN, nil, 'N').freeze

but I don't know which one...
=end

Also available in: Atom PDF