mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	date_strptime.c: get rid of backtrack explosion
* 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/trunk@44126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									037a9d0655
								
							
						
					
					
						commit
						9a938987cb
					
				
					 2 changed files with 9 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,10 @@
 | 
			
		|||
Tue Dec 10 23:58:30 2013  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]
 | 
			
		||||
 | 
			
		||||
Tue Dec 10 23:44:42 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* array.c (rb_ary_hash): add salt to differentiate false and empty
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -567,8 +567,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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue