summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-29 05:45:27 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-29 05:45:27 +0000
commit322610cb37327860396979507c54bb4964fc237f (patch)
treea5285e92816405e4228d707df9ec842bfcf0eace
parent0678e0250181948c998d96219ac03eb471b53edc (diff)
merge revision(s) 44086,44126: [Backport #9221]
* ext/date/date_parse.c (parse_time): unset case-insensitive flag for [:alpha:], which already implies both cases, to get rid of backtrack explosion. [ruby-core:58876] [Bug #9221] * ext/date/date_strptime.c (date__strptime_internal): unset case-insensitive flag for [:alpha:], which already implies both cases, to get rid of backtrack explosion. [ruby-core:58984] [Bug #9221] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@44746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog13
-rw-r--r--ext/date/date_parse.c4
-rw-r--r--ext/date/date_strptime.c4
-rw-r--r--version.h2
4 files changed, 18 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index efbcc1e025..e589913b2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Wed Jan 29 14:44:44 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/date/date_strptime.c (date__strptime_internal): unset
+ case-insensitive flag for [:alpha:], which already implies both
+ cases, to get rid of backtrack explosion. [ruby-core:58984]
+ [Bug #9221]
+
+Wed Jan 29 14:44:44 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/date/date_parse.c (parse_time): unset case-insensitive flag
+ for [:alpha:], which already implies both cases, to get rid of
+ backtrack explosion. [ruby-core:58876] [Bug #9221]
+
Wed Jan 29 14:26:10 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* enumerator.c (enumerator_with_index): should not store local variable
diff --git a/ext/date/date_parse.c b/ext/date/date_parse.c
index 7c8267bbab..0ce0663804 100644
--- a/ext/date/date_parse.c
+++ b/ext/date/date_parse.c
@@ -701,9 +701,9 @@ parse_time(VALUE str, VALUE hash)
"("
"(?:gmt|utc?)?[-+]\\d+(?:[,.:]\\d+(?::\\d+)?)?"
"|"
- "[[:alpha:].\\s]+(?:standard|daylight)\\stime\\b"
+ "(?-i:[[:alpha:].\\s]+)(?:standard|daylight)\\stime\\b"
"|"
- "[[:alpha:]]+(?:\\sdst)?\\b"
+ "(?-i:[[:alpha:]]+)(?:\\sdst)?\\b"
")"
")?";
static VALUE pat = Qnil;
diff --git a/ext/date/date_strptime.c b/ext/date/date_strptime.c
index eaec8e716b..f1196bc0bd 100644
--- a/ext/date/date_strptime.c
+++ b/ext/date/date_strptime.c
@@ -566,8 +566,8 @@ date__strptime_internal(const char *str, size_t slen,
static const char pat_source[] =
"\\A("
"(?:gmt|utc?)?[-+]\\d+(?:[,.:]\\d+(?::\\d+)?)?"
- "|[[:alpha:].\\s]+(?:standard|daylight)\\s+time\\b"
- "|[[:alpha:]]+(?:\\s+dst)?\\b"
+ "|(?-i:[[:alpha:].\\s]+)(?:standard|daylight)\\s+time\\b"
+ "|(?-i:[[:alpha:]]+)(?:\\s+dst)?\\b"
")";
static VALUE pat = Qnil;
VALUE m, b;
diff --git a/version.h b/version.h
index ffd523fd26..be5473019a 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 500
+#define RUBY_PATCHLEVEL 501
#define RUBY_RELEASE_DATE "2014-01-29"
#define RUBY_RELEASE_YEAR 2014