mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* ext/bigdecimal/bigdecimal.c (BigDecimal_power): Use FIX2LONG instead
of FIX2INT to avoid conversion error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									4efba669ec
								
							
						
					
					
						commit
						10ca8a4b07
					
				
					 2 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,8 @@
 | 
			
		|||
Sun Nov 24 01:03:00 2013  Kenta Murata  <mrkn@mrkn.jp>
 | 
			
		||||
 | 
			
		||||
	* ext/bigdecimal/bigdecimal.c (BigDecimal_power): Use FIX2LONG instead
 | 
			
		||||
	  of FIX2INT to avoid conversion error.
 | 
			
		||||
 | 
			
		||||
Sun Nov 24 00:44:30 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): define by macros
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2194,7 +2194,7 @@ BigDecimal_power(int argc, VALUE*argv, VALUE self)
 | 
			
		|||
	return ToValue(y);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
retry:
 | 
			
		||||
  retry:
 | 
			
		||||
    switch (TYPE(vexp)) {
 | 
			
		||||
      case T_FIXNUM:
 | 
			
		||||
	break;
 | 
			
		||||
| 
						 | 
				
			
			@ -2381,7 +2381,7 @@ retry:
 | 
			
		|||
	}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    int_exp = FIX2INT(vexp);
 | 
			
		||||
    int_exp = FIX2LONG(vexp);
 | 
			
		||||
    ma = int_exp;
 | 
			
		||||
    if (ma <  0) ma = -ma;
 | 
			
		||||
    if (ma == 0) ma = 1;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue