mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* enum.c (enum_min, enum_max): must not return Qundef.
fixed: [ruby-core:05299] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									c018c992da
								
							
						
					
					
						commit
						4c04407b19
					
				
					 2 changed files with 9 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,8 @@
 | 
			
		|||
Fri Jul  1 01:45:21 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* enum.c (enum_min, enum_max): must not return Qundef.
 | 
			
		||||
	  fixed: [ruby-core:05299]
 | 
			
		||||
 | 
			
		||||
Fri Jul  1 00:18:40 2005  Yukihiro Matsumoto  <matz@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* lib/delegate.rb (Delegator::respond_to): respond_to? must check
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								enum.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								enum.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -660,6 +660,7 @@ enum_min(obj)
 | 
			
		|||
    VALUE result = Qundef;
 | 
			
		||||
 | 
			
		||||
    rb_iterate(rb_each, obj, rb_block_given_p() ? min_ii : min_i, (VALUE)&result);
 | 
			
		||||
    if (result == Qundef) return Qnil;
 | 
			
		||||
    return result;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -736,6 +737,7 @@ enum_max(obj)
 | 
			
		|||
    VALUE result = Qundef;
 | 
			
		||||
 | 
			
		||||
    rb_iterate(rb_each, obj, rb_block_given_p() ? max_ii : max_i, (VALUE)&result);
 | 
			
		||||
    if (result == Qundef) return Qnil;
 | 
			
		||||
    return result;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue