Project

General

Profile

Actions

Bug #3225

closed

lib/uri/mailto.rb slightly wrong regexp

Added by marcandre (Marc-Andre Lafortune) over 14 years ago. Updated over 13 years ago.

Status:
Closed
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

Actions #1

Updated by naruse (Yui NARUSE) over 14 years ago

=begin
This is introduced in r2934 and it can be encoding parameter: NONE.

But in 1.9, it works different from 1.8, so remove 'N' seems correct.
=end

Actions #2

Updated by marcandre (Marc-Andre Lafortune) over 14 years ago

  • Assignee changed from akira (akira yamada) to marcandre (Marc-Andre Lafortune)

=begin

=end

Actions #3

Updated by marcandre (Marc-Andre Lafortune) over 14 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r27731.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0