lib/timeliness/format_set.rb in timeliness-0.3.7 vs lib/timeliness/format_set.rb in timeliness-0.3.8

- old
+ new

@@ -21,10 +21,10 @@ @formats_hash[format_string] = format @match_indexes[index] = format regexp_string = "#{regexp_string}(#{format.regexp_string})|" index + format.token_count + 1 # add one for wrapper capture } - @regexp = Regexp.new("^(?:#{regexp_string.chop})$") + @regexp = %r[\A(?:#{regexp_string.chop})\z] self end def match(string, format_string=nil) format = single_format(format_string) if format_string