mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* parse.y (assoc_list): remove expanded hash literal (no splat).
* lib/webrick/httpstatus.rb (WEBrick::HTTPStatus::EOFError): adapt to new syntax. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									453f64fa47
								
							
						
					
					
						commit
						71f8ca8bc4
					
				
					 4 changed files with 55 additions and 60 deletions
				
			
		|  | @ -1,3 +1,10 @@ | |||
| Fri Jun 29 14:51:24 2007  Yukihiro Matsumoto  <matz@ruby-lang.org> | ||||
| 
 | ||||
| 	* parse.y (assoc_list): remove expanded hash literal (no splat). | ||||
| 
 | ||||
| 	* lib/webrick/httpstatus.rb (WEBrick::HTTPStatus::EOFError): adapt | ||||
| 	  to new syntax. | ||||
| 
 | ||||
| Fri Jun 29 14:48:18 2007  Koichi Sasada  <ko1@atdot.net> | ||||
| 
 | ||||
| 	* tool/insns2vm.rb, lib/vm/instruction.rb: move process body | ||||
|  |  | |||
|  | @ -23,46 +23,46 @@ module WEBrick | |||
|     class EOFError < StandardError; end | ||||
| 
 | ||||
|     StatusMessage = { | ||||
|       100, 'Continue', | ||||
|       101, 'Switching Protocols', | ||||
|       200, 'OK', | ||||
|       201, 'Created', | ||||
|       202, 'Accepted', | ||||
|       203, 'Non-Authoritative Information', | ||||
|       204, 'No Content', | ||||
|       205, 'Reset Content', | ||||
|       206, 'Partial Content', | ||||
|       300, 'Multiple Choices', | ||||
|       301, 'Moved Permanently', | ||||
|       302, 'Found', | ||||
|       303, 'See Other', | ||||
|       304, 'Not Modified', | ||||
|       305, 'Use Proxy', | ||||
|       307, 'Temporary Redirect', | ||||
|       400, 'Bad Request', | ||||
|       401, 'Unauthorized', | ||||
|       402, 'Payment Required', | ||||
|       403, 'Forbidden', | ||||
|       404, 'Not Found', | ||||
|       405, 'Method Not Allowed', | ||||
|       406, 'Not Acceptable', | ||||
|       407, 'Proxy Authentication Required', | ||||
|       408, 'Request Timeout', | ||||
|       409, 'Conflict', | ||||
|       410, 'Gone', | ||||
|       411, 'Length Required', | ||||
|       412, 'Precondition Failed', | ||||
|       413, 'Request Entity Too Large', | ||||
|       414, 'Request-URI Too Large', | ||||
|       415, 'Unsupported Media Type', | ||||
|       416, 'Request Range Not Satisfiable', | ||||
|       417, 'Expectation Failed', | ||||
|       500, 'Internal Server Error', | ||||
|       501, 'Not Implemented', | ||||
|       502, 'Bad Gateway', | ||||
|       503, 'Service Unavailable', | ||||
|       504, 'Gateway Timeout', | ||||
|       505, 'HTTP Version Not Supported' | ||||
|       100 => 'Continue', | ||||
|       101 => 'Switching Protocols', | ||||
|       200 => 'OK', | ||||
|       201 => 'Created', | ||||
|       202 => 'Accepted', | ||||
|       203 => 'Non-Authoritative Information', | ||||
|       204 => 'No Content', | ||||
|       205 => 'Reset Content', | ||||
|       206 => 'Partial Content', | ||||
|       300 => 'Multiple Choices', | ||||
|       301 => 'Moved Permanently', | ||||
|       302 => 'Found', | ||||
|       303 => 'See Other', | ||||
|       304 => 'Not Modified', | ||||
|       305 => 'Use Proxy', | ||||
|       307 => 'Temporary Redirect', | ||||
|       400 => 'Bad Request', | ||||
|       401 => 'Unauthorized', | ||||
|       402 => 'Payment Required', | ||||
|       403 => 'Forbidden', | ||||
|       404 => 'Not Found', | ||||
|       405 => 'Method Not Allowed', | ||||
|       406 => 'Not Acceptable', | ||||
|       407 => 'Proxy Authentication Required', | ||||
|       408 => 'Request Timeout', | ||||
|       409 => 'Conflict', | ||||
|       410 => 'Gone', | ||||
|       411 => 'Length Required', | ||||
|       412 => 'Precondition Failed', | ||||
|       413 => 'Request Entity Too Large', | ||||
|       414 => 'Request-URI Too Large', | ||||
|       415 => 'Unsupported Media Type', | ||||
|       416 => 'Request Range Not Satisfiable', | ||||
|       417 => 'Expectation Failed', | ||||
|       500 => 'Internal Server Error', | ||||
|       501 => 'Not Implemented', | ||||
|       502 => 'Bad Gateway', | ||||
|       503 => 'Service Unavailable', | ||||
|       504 => 'Gateway Timeout', | ||||
|       505 => 'HTTP Version Not Supported' | ||||
|     } | ||||
| 
 | ||||
|     CodeToError = {} | ||||
|  |  | |||
							
								
								
									
										11
									
								
								parse.y
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								parse.y
									
										
									
									
									
								
							|  | @ -4326,17 +4326,6 @@ assoc_list	: none | |||
| 			$$ = dispatch1(assoclist_from_args, $1); | ||||
| 		    %*/ | ||||
| 		    } | ||||
| 		| args trailer | ||||
| 		    { | ||||
| 		    /*%%%*/ | ||||
| 			if (nd_type($1) == NODE_ARRAY && $1->nd_alen%2 != 0) { | ||||
| 			    yyerror("odd number list for Hash"); | ||||
| 			} | ||||
| 			$$ = $1; | ||||
| 		    /*% | ||||
| 			$$ = dispatch1(assoclist_from_args, $1); | ||||
| 		    %*/ | ||||
| 		    } | ||||
| 		; | ||||
| 
 | ||||
| assocs		: assoc | ||||
|  |  | |||
|  | @ -750,12 +750,11 @@ test_ok($x == [1,2,3,1,2,3]) | |||
| 
 | ||||
| test_check "hash" | ||||
| $x = {1=>2, 2=>4, 3=>6} | ||||
| $y = {1, 2, 2, 4, 3, 6} | ||||
| 
 | ||||
| test_ok($x[1] == 2) | ||||
| 
 | ||||
| test_ok(begin    | ||||
|      for k,v in $y | ||||
|      for k,v in $x | ||||
|        raise if k*2 != v | ||||
|      end | ||||
|      true | ||||
|  | @ -769,19 +768,19 @@ test_ok($x.has_value?(4)) | |||
| test_ok($x.values_at(2,3) == [4,6]) | ||||
| test_ok($x == {1=>2, 2=>4, 3=>6}) | ||||
| 
 | ||||
| $z = $y.keys.sort.join(":") | ||||
| $z = $x.keys.sort.join(":") | ||||
| test_ok($z == "1:2:3") | ||||
| 
 | ||||
| $z = $y.values.sort.join(":") | ||||
| $z = $x.values.sort.join(":") | ||||
| test_ok($z == "2:4:6") | ||||
| test_ok($x == $y) | ||||
| test_ok($x == $x) | ||||
| 
 | ||||
| $y.shift | ||||
| test_ok($y.length == 2) | ||||
| $x.shift | ||||
| test_ok($x.length == 2) | ||||
| 
 | ||||
| $z = [1,2] | ||||
| $y[$z] = 256 | ||||
| test_ok($y[$z] == 256) | ||||
| $x[$z] = 256 | ||||
| test_ok($x[$z] == 256) | ||||
| 
 | ||||
| $x = Hash.new(0) | ||||
| $x[1] = 1 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 matz
						matz