mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* array.c (rb_ary_dup): reverted r39004. see [Bug #7768], and the
release manager finailly decided to revert it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									98932f5150
								
							
						
					
					
						commit
						450a515e95
					
				
					 3 changed files with 6 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,8 @@
 | 
			
		|||
Fri Feb  8 19:56:54 2013  NAKAMURA Usaku  <usa@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* array.c (rb_ary_dup): reverted r39004.  see [Bug #7768], and
 | 
			
		||||
	  release manager finailly decided to revert it.
 | 
			
		||||
 | 
			
		||||
Fri Feb  8 16:09:45 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* eval.c (rb_ensure): preserve errinfo accross ensure proc before
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								array.c
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								array.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1778,8 +1778,7 @@ rb_ary_empty_p(VALUE ary)
 | 
			
		|||
VALUE
 | 
			
		||||
rb_ary_dup(VALUE ary)
 | 
			
		||||
{
 | 
			
		||||
    VALUE ary_class = rb_obj_class(ary);
 | 
			
		||||
    VALUE dup = ary_new(ary_class ? ary_class : rb_cArray, RARRAY_LEN(ary));
 | 
			
		||||
    VALUE dup = rb_ary_new2(RARRAY_LEN(ary));
 | 
			
		||||
    MEMCPY(RARRAY_PTR(dup), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary));
 | 
			
		||||
    ARY_SET_LEN(dup, RARRAY_LEN(ary));
 | 
			
		||||
    return dup;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2283,11 +2283,4 @@ class TestArray < Test::Unit::TestCase
 | 
			
		|||
 | 
			
		||||
    assert_include([4, 7], a.bsearch {|x| (2**100).coerce((1 - x / 4) * (2**100)).first })
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def test_array_uniq_returns_same_class # [ruby-core:51792]
 | 
			
		||||
    klass = Class.new(Array)
 | 
			
		||||
    assert_equal klass, klass.new(2).uniq.class
 | 
			
		||||
    assert_equal klass, klass.new(1).uniq.class
 | 
			
		||||
    assert_equal klass, klass.new(0).uniq.class
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue