mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* hash.c: Improve documentation of Hash#key. Patch by Utkarsh
Kukreti. [Ruby 1.9 - Bug #4760] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									6cfb4b614a
								
							
						
					
					
						commit
						317e2a5021
					
				
					 2 changed files with 9 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,8 @@
 | 
			
		|||
Mon May 23 08:35:24 2011  Eric Hodel  <drbrain@segment7.net>
 | 
			
		||||
 | 
			
		||||
	* hash.c:  Improve documentation of Hash#key.  Patch by Utkarsh
 | 
			
		||||
	  Kukreti.  [Ruby 1.9 - Bug #4760]
 | 
			
		||||
 | 
			
		||||
Mon May 23 08:32:59 2011  Eric Hodel  <drbrain@segment7.net>
 | 
			
		||||
 | 
			
		||||
	* enumerator.c:  Improve documentation.  Patch by Dave Copeland.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										6
									
								
								hash.c
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								hash.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -740,10 +740,12 @@ key_i(VALUE key, VALUE value, VALUE arg)
 | 
			
		|||
 *  call-seq:
 | 
			
		||||
 *     hsh.key(value)    -> key
 | 
			
		||||
 *
 | 
			
		||||
 *  Returns the key for a given value. If not found, returns <code>nil</code>.
 | 
			
		||||
 *  Returns the key of the first occurrence of a given value. If the value is
 | 
			
		||||
 *  not found, returns <code>nil</code>.
 | 
			
		||||
 *
 | 
			
		||||
 *     h = { "a" => 100, "b" => 200 }
 | 
			
		||||
 *     h = { "a" => 100, "b" => 200, "c" => 300, "d" => 300 }
 | 
			
		||||
 *     h.key(200)   #=> "b"
 | 
			
		||||
 *     h.key(300)   #=> "c"
 | 
			
		||||
 *     h.key(999)   #=> nil
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue