summaryrefslogtreecommitdiffstats
path: root/random.c
Commit message (Collapse)AuthorAgeFilesLines
* * random.c (rand_init): suppress warning.nobu2005-02-121-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (rand_init): use ALLOC_N instead of ALLOCA_Nakr2005-01-071-2/+2
| | | | | | | by TAMURA Takashi. [ruby-dev:25426] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (random_seed): O_NONBLOCK isn't defined on someocean2005-01-061-1/+4
| | | | | | | platforms. [ruby-dev:25417] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (limited_big_rand): didn't work if SIZEOF_BDIGITS == 2.akr2005-01-051-15/+19
| | | | | | | | | [ruby-dev:25408] * random.c (random_seed): refined. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (init_by_array): imported from mt19937ar-cok.tgz.akr2005-01-041-37/+216
| | | | | | | | | | | | | | | (genrand_int32): ditto. (genrand_real): replaced with genrand_res53 in mt19937ar-cok. (rand_init): support bignum for longer seed. (random_seed): generate longer seed. (make_mask): new function. (limited_rand): ditto. (limited_big_rand): ditto. (rb_f_rand): call limited_rand and limited_big_rand. [ruby-dev:25403] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (random_seed): don't use /dev/urandom if it is not character device.akr2005-01-031-3/+15
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (random_seed): use /dev/urandom if available.akr2005-01-031-1/+19
| | | | | | | [ruby-dev:25392] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_yield_0): should not re-submit TAG_BREAK if thismatz2004-03-151-1/+1
| | | | | | | yield is not break destination. [ruby-dev:23197] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* RDoc Struct and randomdave2003-12-281-0/+34
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (BIGZEROP): macro to determine if x is a bignum zero.matz2003-04-091-5/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (rb_f_rand): normalize bignum argument.matz2003-04-081-0/+5
| | | | | | | | * sprintf.c (rb_f_sprintf): was decrementing width even if there is no sign character. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (rb_f_rand): type fix.eban2003-01-311-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (yylex): remove EXPR_CMDARG according to the RHG book.matz2003-01-311-0/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Updated Copyrights of Matz to 2003.michal2003-01-161-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* move struct timeval to missing.hmichal2002-09-171-10/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* *.c: Int vs Long cleanupmichal2002-08-211-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c (rb_hash_replace): should copy ifnone.matz2002-08-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * hash.c (rb_hash_dup): should preserve HASH_PROC_DEFAULT and HASH_DELETED flags. * hash.c (rb_hash_shift): shift from empty hash should not return its default proc. * hash.c (rb_hash_default_proc): new method. [new] * array.c (rb_ary_aref): no need for Bignum check. * array.c (rb_ary_aset): explicit Bignum check removd. * numeric.c (fix_aref): normalize bignum before bit-op. * bignum.c (rb_big_rand): max may be Bignum zero. * bignum.c (rb_cstr_to_inum): should normalize bignums, to avoid returning fixable bignum value. * bignum.c (rb_uint2big): there should be no zero sized bignum. * ext/extmk.rb.in: extmake() that works properly for both tkutil (tk/tkutil.so) and digest/sha1. * hash.c (rb_hash_equal): should check HASH_PROC_DEFAULT too. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (N, M): undef for <winnt.h> on MinGW.eban2002-07-261-0/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c: replace with Mersenne Twister RNG.matz2002-07-261-80/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eval.c (jump_tag_but_local_jump): preserve retval in LocalJumpError exceptions. * parse.y (command): no more check for "super outside of method". * eval.c (rb_mod_define_method): should set last_class and last_func in the block->frame. * eval.c (error_handle): should handle TAG_THROW as well. * parse.y (yylex): new decimal notation '0d4567'. * parse.y (yylex): new octal notation '0o777'. * parse.y (string_content): every string_content node should return string only. use NODE_EVSTR to coercing. * eval.c (rb_eval): NODE_EVSTR support. * re.c (rb_reg_quote): avoid unnecessary string allocation. * string.c (get_pat): quote metachracters before compiling a string into a regex. * string.c (rb_str_split_m): special treatment of strings of size 1, but AWK emulation. now uses get_pat(). * string.c (rb_str_match_m): quote metacharacters. * string.c (rb_str_match2): ditto. * ext/socket/socket.c (sock_addrinfo): make all 3 versions of getaddrinfo happy. [ruby-core:00184] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * various files: macro fix-up by Michal Rokos.matz2002-04-251-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_expr_str): should treat backslash specially inmatz2002-04-181-6/+6
| | | | | | | | | | | | | | | | | escaping. * io.c: complete off_t handling; missing argument for fptr_finalize(); polished rb_scan_args call. * dir.c: wrap multi-statment macro by do { } while (0) * eval.c, numeric,c, sprintf.c, util.c: ditto. * bignum.c (rb_big_eq): check `y == x' if y is neither Fixnum, Bignum, nor Float. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (rand_init): add check for initstate(3).eban2002-04-111-1/+1
| | | | | | | * configure.in: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (READ_DATA_PENDING): uClibc support.eban2002-02-271-1/+1
| | | | | | | | * random.c (rand_init): ditto. * ext/socket/{addinfo.h,getaddrinfo.c} (gai_strerror): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (dir_s_glob): supprt backslash escape of metacharactersmatz2001-02-141-1/+1
| | | | | | | | | | | | | | | | | | | and delimiters. * dir.c (remove_backslases): remove backslashes from path before calling stat(2). * dir.c (dir_s_glob): call rb_yield directly (via push_pattern) if block is given to the method. * dir.c (push_pattern): do not call rb_ary_push; yield directly. * eval.c (blk_copy_prev): reduced ALLOC_N too much. * eval.c (frame_dup): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-11-141-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-11-021-1/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matz - nakada win32 patchmatz2000-08-031-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-07-041-4/+13
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2000-05-01matz2000-05-011-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2000-02-08matz2000-02-081-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2000-01-17matz2000-01-171-5/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2000-01-08matz2000-01-081-15/+33
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 20000105matz2000-01-051-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 19991206matz1999-12-061-6/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* unsigned seedmatz1999-10-271-6/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 1.4.1matz1999-09-161-1/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* regexp literal (e.g. \202) match, etc.matz1999-09-011-1/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 1.4.0matz1999-08-131-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* This commit was generated by cvs2svn to compensate for changes in r372,matz1999-01-201-37/+85
| | | | | | | which included commits to RCS files with non-trunk default branches. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* This commit was generated by cvs2svn to compensate for changes in r11,matz1998-01-161-1/+2
| | | | | | | which included commits to RCS files with non-trunk default branches. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Initial revisionmatz1998-01-161-0/+100
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2 b2dd03c8-39d4-4d8f-98ff-823fe69b080e