From: jbcden@... Date: 2017-06-14T22:05:28+00:00 Subject: [ruby-core:81683] [Ruby trunk Bug#13661] DateTime.parse parses strings with a month abbreviation after a word boundary as a valid date Issue #13661 has been reported by jbcden (Jacob Chae). ---------------------------------------- Bug #13661: DateTime.parse parses strings with a month abbreviation after a word boundary as a valid date https://bugs.ruby-lang.org/issues/13661 * Author: jbcden (Jacob Chae) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: 2.4.1 * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- When parsing a string like "mark@gmail.com" it parses it into a DateTime i.e.: ~~~ ruby require 'date' DateTime.parse('mark@gmail.com') #=> # ~~~ It seems like https://github.com/ruby/ruby/blob/9c9c46e5a30fb47068337932eefde759b2763551/ext/date/date_parse.c#L1612 is the source of the issue. I think this might just require a slight tweak of the regex, it looks like things like "test.mark@gmail.com" work but not "testmark@gmail.com". -- https://bugs.ruby-lang.org/ Unsubscribe: