From b5300ac5f74a81d268709337bf6e98eb14430f5a Mon Sep 17 00:00:00 2001 From: Josef Stribny Date: Tue, 19 Mar 2013 16:52:36 +0100 Subject: [PATCH] Fix encoding of regexps for Ruby 2.0 --- lib/rmail/address.rb | 2 +- lib/rmail/header.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rmail/address.rb b/lib/rmail/address.rb index a035e04..8265823 100644 --- a/lib/rmail/address.rb +++ b/lib/rmail/address.rb @@ -703,7 +703,7 @@ def get_tokenize @sym = SYM_DOMAIN_LITERAL @lexeme = $1.gsub(/(^|[^\\])[\r\n\t ]+/, '\1').gsub(/\\(.)/, '\1') break - when /\A[\200-\377\w!$%&\'*+\/=?^_\`{\}|~#-]+/m + when /\A[\200-\377\w!$%&\'*+\/=?^_\`{\}|~#-]+/nm # This is just like SYM_ATOM, but includes all characters # with high bits. This is so we can allow such tokens in # the display name portion of an address even though it diff --git a/lib/rmail/header.rb b/lib/rmail/header.rb index 9102f28..ca4d0b6 100644 --- a/lib/rmail/header.rb +++ b/lib/rmail/header.rb @@ -73,7 +73,7 @@ class Header class Field # :nodoc: # fixme, document methadology for this (RFC2822) - EXTRACT_FIELD_NAME_RE = /\A([^\x00-\x1f\x7f-\xff :]+):\s*/o + EXTRACT_FIELD_NAME_RE = /\A([^\x00-\x1f\x7f-\xff :]+):\s*/no class << self def parse(field)