summaryrefslogtreecommitdiff
path: root/bignum.c
AgeCommit message (Collapse)Author
2007-09-19 * bignum.c (bigtrunc): RBIGNUM(x)->len may be zero. out of boundshyouhei
access. [ruby-dev:31404] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-07 * bignum.c (big_lshift): make shift offset long type.shyouhei
(big_rshift): ditto. (rb_big_lshift): ditto. (big_rshift): ditto. [ruby-dev:31434] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22 * bignum.c (rb_big_aref): check for Bignum index range.shyouhei
[ruby-dev:31271] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22* bignum.c (rb_big_lshift, rb_big_rshift): separated functionsshyouhei
to get rid of infinite recursion. fixed calculation in edge cases. [ruby-dev:31244] * numeric.c (rb_fix_lshift, rb_fix_rshift): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22 * bignum.c (rb_big_pow): refine overflow check. [ruby-dev:31242]shyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22 * bignum.c (rb_cstr_to_inum): check leading non-digits.shyouhei
[ruby-core:11691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-22 * bignum.c (rb_big_neg): SIGNED_VALUE isn't in 1.8.shyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-22merge -c 12224shyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-22merge -c 12116shyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-24* bignum.c (bignorm): avoid segmentation. a patch from Hiroyukimatz
Ito <ZXB01226@nifty.com>. [ruby-list:43012] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-30* bignum.c (rb_big2str0): use better approximation.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-30* bignum.c (rb_big2str0): wrong allocation length.matz
[ruby-dev:29710] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-30* bignum.c (rb_big2str0): a bug in length adjustment.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-30* sprintf.c (rb_str_format): should preserve leading zeromatz
information for negative %b and %x. [ruby-talk:221347] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-07* bignum.c (rb_big_rshift): a bug in right shift of negativematz
bignums. [ruby-core:09020] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-09* bignum.c (rb_big_mul0): bignum multiplication withoutmatz
normalization. * bignum.c (rb_big_pow): use rb_big_mul0(). [ruby-dev:29547] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-07* numeric.c (fix_plus): addition in Fixnum will never overflowmatz
long. a patch from Ondrej Bilka <neleai at seznam.cz>. [ruby-core:08794] * numeric.c (fix_minus): ditto. * bignum.c (rb_big_pow): eagerly truncate resulting bignum. [ruby-core:08794] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-04-09* prec.c (prec_prec_f): documentation patch frommatz
<gerardo.santana at gmail.com>. [ruby-core:07689] * bignum.c (rb_big_pow): second operand may be too big even if it's a Fixnum. [ruby-talk:187984] * README.EXT: update symbol description. [ruby-talk:188104] * COPYING: explicitly note GPLv2. [ruby-talk:187922] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-16* bignum.c (rb_big_rshift): fix a GC problem onakr
IA64 with gcc 4.0.3 20051216 (prerelease). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-21* bignum.c (bignew_1): convertion from `int' to `char' discardsocean
upper bits, (ie. (char)0xff00 -> 0) so it's better to test if nonzero and set 0 or 1 instead of simply casting ... as a flag usage. (but I believe this won't cause actual bug in current implementation) [ruby-dev:27055] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-06* Makefile.in, configure.in (MINIOBJS): miniruby on HP-UX can not loadnobu
extension libraries. * bignum.c (bignew_1, bigadd): K&R style argument actually can't be defined as char. * missing/vsnprintf.c: ANSI compiler supports const keyword. * ext/digest/sha2/extconf.rb: reject platforms which has inttypes.h but no 64bit integer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-10* bignum.c (rb_big_coerce): allow bignum x bignum coercing.matz
[ruby-dev:26778] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-22* bignum.c (rb_big_eq): reduce isnan(). [ruby-dev:26600]matz
* numeric.c (flo_eq, flo_gt, flo_ge, flo_lt, flo_le): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-01* bignum.c (get2comp): revert all prior changes, and calculatematz
proper 2's complement for negative numbers. backported from HEAD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-08* bignum.c (get2comp): calculate proper 2's complement formatz
negative numbers. a bug in normalizing negative numbers reported from Honda Hiroki <hhonda@ipflex.com>. * ext/socket/socket.c (ruby_getaddrinfo__aix): merged a patch from KUBO Takehiro <kubo@jiubao.org> to support AIX. [ruby-list:40832] * lib/yaml/rubytypes.rb (Array::to_yaml): merged a patch from Tilman Sauerbeck <tilman@code-monkey.de>. [ruby-core:05055] * lib/yaml/rubytypes.rb (Hash::to_yaml): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-28* exception error messages updated. [ruby-core:04497]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-06* bignum.c (rb_big2ulong_pack): One too many arguments are passedknu
to big2ulong(). * re.c (_reg_init_copy, rb_reg_initialize_m): One too many arguments are passed to rb_reg_initialize(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-04* bignum.c (rb_big_rand): should return positive random number.matz
[ruby-dev:25401] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-04* bignum.c (rb_big_rand): should return positive random number.matz
[ruby-dev:25401] * bignum.c (rb_big_rand): do not use rb_big_modulo to generate random bignums. [ruby-dev:25396] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-16* pack.c: all features are backport from 1.9. [ruby-dev:24826]gotoyuzo
* bignum.c (rb_big2ulong_pack): new function to pack Bignums. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-03* struct.c (make_struct): remove redefining constant whenmatz
conflict. [ruby-dev:24210] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-28* bignum.c (rb_big_and): protect parameters from GC.matz
[ruby-talk:110664] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-04* io.c (rb_io_gets_m): set lastline ($_) even when read line ismatz
nil. [ruby-dev:23663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07* eval.c (rb_eval): too many line trace call. (ruby-bugs PR#1320)matz
* numeric.c (flo_to_s): tweak output string based to preserve decimal point and to remove trailing zeros. [ruby-talk:97891] * string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM search. [ruby-talk:97342] * hash.c (rb_hash_equal): returns true if two hashes have same set of key-value set. [ruby-talk:97559] * hash.c (rb_hash_eql): returns true if two hashes are equal and have same default values. * string.c (rb_str_equal): always returns true or false, never returns nil. [ruby-dev:23404] * io.c (rb_io_reopen): should use rb_io_check_io(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-05* eval.c (top_include): include in the wrapped load is done formatz
the wrapper, not for a singleton class for wrapped main. [ruby-dev:23305] * bignum.c (rb_big_eq): use temporary double variable to save the result (internal float register may be bigger than 64 bits, for example, 80 bits on x86). [ruby-dev:23311] * eval.c (block_pass): should generate unique identifier of the pushing block. [ruby-talk:96363] * ext/socket/socket.c (make_hostent): fix memory leak, based on the patch from HORIKAWA Hisashi <vzw00011@nifty.ne.jp>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-15* eval.c (rb_yield_0): should not re-submit TAG_BREAK if thismatz
yield is not break destination. [ruby-dev:23197] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-29Add RDoc for Kernel global functions, tidy array and errordave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-26* io.c (next_argv): warn always for stdin on inplace edit mode.matz
* io.c (read_all): need to check string value. * io.c (argf_read): allow ARGF.read(nil). [ruby-dev:22433] * io.c (rb_f_backquote): need not to check nil result. [ruby-core:02078] * io.c (rb_io_getline): should return nil when read_all gives empty string, even when nil rs is specified. [ruby-core:02077] * pack.c (pack_pack): add sign check for 'i', and 'l'. [ruby-dev:22427] * bignum.c (rb_quad_pack): add range check for 'quad int'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-22* configure.in (ac_cv_func_setitimer): moved from defines.hnobu
* defines.h, rubysig.h, signal.c: removed macro handling which should be done in configure. * configure.in (intrinsics.h): check if present. * ruby.h: include intrinsics.h if available. * bignum.c, marshal.c: include ieeefp.h if available. * missing.h (isinf): define as a macro if finite() and isnan() are available. [ruby-core:02032] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-19Add boot_classes to rdoc parsing, fix a couple of bugsdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-19Fix dependency issuedave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-09* marshal.c (r_object0): remove unnecessary iv restoration formatz
USRMARSHAL. [ruby-dev:21582] * marshal.c (w_object): dump generic instance variables from a string from '_dump'. * variable.c (rb_generic_ivar_table): return 0 if obj's FL_EXIVAR is not set. * time.c (time_dump): copy instance variables to dumped string, to be included in the marshaled data. * bignum.c (rb_big2ulong): add range check to ensure round trip. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-12* bignum.c (rb_big_and): convert argument using 'to_int'.matz
* bignum.c (rb_big_or): ditto. * bignum.c (rb_big_xor): ditto. * eval.c (rb_f_require): allow "require" on $SAFE>0, if feature name is not tainted. * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::stream): Supports StringIO. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24* gcc -Wall clean-up.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-20* string.c: use StringValueCStr to retrieve paths to system calls.matz
* string.c (rb_string_value_cstr): check null byte in the string before retrieving C ptr. accessed via macro StringValueCStr. * file.c (sys_fail2): raise error for two operand system calls such as rename, link, symlink. (ruby-bugs PR#1047) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-09* eval.c (rb_load): put rb_load_file() in a thread criticalmatz
section. [ruby-dev:20490] * eval.c (compile): put rb_compile_string() in a thread critical section. * variable.c (rb_const_get_0): should not warn if constant is not defined. (ruby-bugs-ja PR#509) * bignum.c (rb_big2dbl): give a warning on overflow. (ruby-bugs-ja PR#510) * util.c (ruby_strtod): change MDMAXEXPT from 511 to 308. * pack.c (utf8_to_uv): long is sufficient. LONG_LONG is not required. * bignum.c (rb_big2str): support 32 bit (without `long long' type) machines. (ruby-bugs-ja PR#512) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-25* bignum.c (rb_quad_pack): should negate negative bignum.nobu
(ruby-bugs-ja:PR#474) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-21* bignum.c (rb_cstr_to_inum): unnecessarily long buffer was usednobu
for radix 9. [ruby-dev:20057] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-14* bignum.c (rb_cstr_to_inum, rb_big2str): allow 2-36 as radix.nobu
* numeric.c (rb_fix2str): ditto. * string.c (rb_str_to_i): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09* bignum.c (bigdivmod): small typo.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e