ruby/test/ruby
akr 04739ba617 * string.c (rb_memhash): randomize hash to avoid algorithmic
complexity attacks.
  (rb_str_hash): use rb_memhash.

* include/ruby/intern.h (rb_reset_random_seed): declared.

* thread.c (rb_thread_atfork): call rb_reset_random_seed.

* inits.c (rb_call_inits): call Init_RandomSeed at first.

* random.c (seed_initialized): defined.
  (fill_random_seed): extracted from random_seed.
  (make_seed_value): extracted from random_seed.
  (rb_f_rand): initialize random seed at first.
  (initial_seed): defined.
  (Init_RandomSeed): defined.
  (Init_RandomSeed2): defined.
  (rb_reset_random_seed): defined.
  (Init_Random): call Init_RandomSeed2.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-20 02:46:17 +00:00
..
allpairs.rb * test/ruby/allpairs.rb: new file for all pairs method. 2008-03-01 04:12:13 +00:00
beginmainend.rb * Merge YARV 2006-12-31 15:02:22 +00:00
endblockwarn_rb * test/ruby/test_beginendblock.rb (TestBeginEndBlock::test_endblockwarn): 2007-12-23 15:48:39 +00:00
envutil.rb * test/ruby/envutil.rb (assert_normal_exit): show coredump status. 2008-06-01 01:32:54 +00:00
lbtest.rb * test/ruby/test_thread.rb: new tests from Sylvain Joyeux in 2008-04-09 03:12:03 +00:00
marshaltestlib.rb * marshal.c (w_object): TYPE_USERDEF assigns id for ivars first. 2008-04-10 08:41:46 +00:00
sentence.rb * test/ruby/sentence.rb (Sentence): include Enumerable. 2007-08-24 19:01:46 +00:00
test_alias.rb * eval.c (rb_f_send): allow send/__send__ to call methods of all 2007-11-04 20:36:20 +00:00
test_argf.rb * test/ruby/test_argf.rb: support NO_SAFE_RENAME platforms. 2008-06-18 07:28:24 +00:00
test_array.rb * enum.c (enum_count, count_all_i, Init_Enumerable), 2008-05-29 19:18:54 +00:00
test_assignment.rb * prelude.rb (require_relative): move require_relative from 2008-04-12 14:50:18 +00:00
test_basicinstructions.rb * test/ruby/test_basicinstructions.rb: updated for new class 2007-11-09 04:37:36 +00:00
test_beginendblock.rb * prelude.rb (require_relative): move require_relative from 2008-04-12 14:50:18 +00:00
test_big5.rb * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. 2008-06-02 13:30:38 +00:00
test_bignum.rb test the actual value of (10**32768-1).to_s. 2008-05-14 00:01:24 +00:00
test_call.rb * test/*: should not depend on $KCODE. 2004-02-18 13:08:08 +00:00
test_case.rb * test/*: should not depend on $KCODE. 2004-02-18 13:08:08 +00:00
test_class.rb * test/ruby/test_file.rb: add tests for uninitialized object. 2008-06-02 12:57:18 +00:00
test_clone.rb * test/ruby/test_clone.rb: fix to current spec 2007-02-08 13:32:01 +00:00
test_comparable.rb * test/ruby/test_comparable.rb: new tests for Comparable, to achieve 2008-04-24 13:38:01 +00:00
test_complex.rb * complex.c (nucomp_div): [ruby-dev:34357] 2008-04-14 22:30:45 +00:00
test_condition.rb * test/*: should not depend on $KCODE. 2004-02-18 13:08:08 +00:00
test_const.rb * Merge YARV 2006-12-31 15:02:22 +00:00
test_continuation.rb add a test for [ruby-dev:34802]. 2008-05-22 08:41:07 +00:00
test_cp949.rb * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. 2008-06-02 13:30:38 +00:00
test_defined.rb * compile.c, insns.def: change return value of "defined?" 2007-11-27 04:43:54 +00:00
test_dir.rb * test/ruby/test_dir.rb (TestDir::test_glob): glob file names not sorted. 2008-06-09 06:41:06 +00:00
test_encoding.rb * test/ruby/test_dir.rb: add tests to achieve over 90% test coverage 2008-06-03 13:34:48 +00:00
test_enum.rb * enum.c (enum_count, count_all_i, Init_Enumerable), 2008-05-29 19:18:54 +00:00
test_enumerator.rb * test/ruby/test_enumerator.rb: fix to skip "with_memo" test. 2008-06-19 02:49:28 +00:00
test_env.rb * test/ruby/test_io_m17n.rb: remove a duplicative method. 2008-05-13 15:57:22 +00:00
test_euc_jp.rb * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. 2008-06-02 13:30:38 +00:00
test_euc_kr.rb * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. 2008-06-02 13:30:38 +00:00
test_euc_tw.rb * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. 2008-06-02 13:30:38 +00:00
test_eval.rb * eval.c, vm_insnhelper.c: fix cref in instance_eval 2008-05-19 18:47:56 +00:00
test_exception.rb * test/ruby/test_object.rb: new tests to achieve over 90% test 2008-05-14 12:52:17 +00:00
test_fiber.rb * cont.c: Thread local storage should be fiber local. 2007-09-28 19:04:45 +00:00
test_file.rb * test/ruby/test_file.rb: add tests for uninitialized object. 2008-06-02 12:57:18 +00:00
test_file_exhaustive.rb * test/ruby/test_file_exhaustive.rb (setup): workaround for Windows 2008-05-20 16:48:32 +00:00
test_fixnum.rb * test/ruby/test_io_m17n.rb: remove a duplicative method. 2008-05-13 15:57:22 +00:00
test_float.rb * test/ruby/test_float.rb: add tests. [ruby-dev:35009] 2008-06-10 12:08:45 +00:00
test_fnmatch.rb use ML ref. for assertion message. 2007-11-18 07:18:56 +00:00
test_gb18030.rb * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. 2008-06-02 13:30:38 +00:00
test_gbk.rb * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. 2008-06-02 13:30:38 +00:00
test_gc.rb * test/ruby/test_gc.rb: add tests to achieve over 90% test coverage of 2008-06-05 14:57:05 +00:00
test_hash.rb * hash.c (hash_i): make Hash#hash order insensitive. 2008-06-07 16:19:47 +00:00
test_ifunless.rb * test/*: should not depend on $KCODE. 2004-02-18 13:08:08 +00:00
test_integer.rb * test/ruby/test_object.rb: new tests to achieve over 90% test 2008-05-14 12:52:17 +00:00
test_integer_comb.rb split combinational blackbox tests. 2008-05-01 02:02:49 +00:00
test_io.rb * test/ruby/test_io.rb (test_copy_stream_dst_rbuf): set binmode. 2008-06-18 09:45:41 +00:00
test_io_m17n.rb * test/ruby/test_io_m17n.rb: remove a duplicative method. 2008-05-13 15:57:22 +00:00
test_iso_8859.rb * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. 2008-06-02 13:30:38 +00:00
test_iterator.rb * test/ruby/test_iterator.rb (TestIterator::test_enumerator): 2008-02-29 13:44:50 +00:00
test_koi8.rb * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. 2008-06-02 13:30:38 +00:00
test_lambda.rb * parse.y (new_yield), compile.c (iseq_compile_each): fix 2007-06-05 17:26:00 +00:00
test_literal.rb add tests. 2008-03-01 16:16:46 +00:00
test_m17n.rb * bootstraptest/test_knownbug.rb: move solved tests. 2008-05-19 05:20:21 +00:00
test_m17n_comb.rb * string.c (tr_trans): should squeeze properly. [ruby-dev:34587] 2008-05-07 16:15:45 +00:00
test_marshal.rb avoid dead lock on MacOS X. 2008-06-08 03:01:55 +00:00
test_math.rb * missing/lgamma_r.c (loggamma): return 0 for 1 and 2. 2008-03-06 05:53:03 +00:00
test_method.rb * test/ruby/test_method.rb: add a test. 2008-06-02 16:22:47 +00:00
test_mixed_unicode_escapes.rb * parse.y: patch, based on Nobu's, work to support \u escapes 2007-11-07 22:55:27 +00:00
test_module.rb * test/ruby/test_modules.rb (remove_json_mixins): change judgment 2008-05-24 19:31:30 +00:00
test_numeric.rb * numeric.c (num_div): should raise ZeroDivisionError. 2008-05-27 12:51:28 +00:00
test_object.rb * test/ruby/test_object.rb: new tests to achieve over 90% test 2008-05-14 12:52:17 +00:00
test_objectspace.rb * test/ruby/test_gc.rb: add tests to achieve over 90% test coverage of 2008-06-05 14:57:05 +00:00
test_optimization.rb * test/ruby/test_optimization.rb: restore method before calling assert_equal. 2007-02-26 15:45:52 +00:00
test_pack.rb * pack.c (pack_pack): check errno to detect error of ruby_strtoul. 2008-05-17 17:56:41 +00:00
test_parse.rb * test/ruby/test_parse.rb (TestParse::test_void_expr_stmts_value): 2008-05-01 12:47:07 +00:00
test_path.rb use ML ref. for assertion message. 2007-11-18 07:18:56 +00:00
test_pipe.rb * prelude.rb (require_relative): move require_relative from 2008-04-12 14:50:18 +00:00
test_prec.rb * test/ruby/test_hash.rb: follow the change of Hash#flatten. 2008-02-07 15:09:12 +00:00
test_primitive.rb * eval.c (rb_f_send): allow send/__send__ to call methods of all 2007-11-04 20:36:20 +00:00
test_proc.rb * bootstraptest/test_knownbug.rb: move solved tests. 2008-05-19 05:20:21 +00:00
test_process.rb * test/ruby/test_process.rb: add tests. 2008-06-04 16:30:03 +00:00
test_rand.rb * test/ruby/test_rand.rb: add tests to achieve over 95% test coverage 2008-03-25 15:56:36 +00:00
test_range.rb add tests for [ruby-dev:34557] and [ruby-dev:34558]. 2008-05-02 07:52:01 +00:00
test_rational.rb * test/ruby/test_io_m17n.rb: remove a duplicative method. 2008-05-13 15:57:22 +00:00
test_rational2.rb improvements. 2008-03-20 12:26:58 +00:00
test_readpartial.rb * test/ruby/test_readpartial.rb: tests are working on mswin32/cygwin. 2007-02-09 02:07:34 +00:00
test_regexp.rb * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. 2008-06-02 13:30:38 +00:00
test_require.rb * test/ruby/test_require.rb: add a test for load with wrap flag, to 2008-05-29 13:51:52 +00:00
test_rubyoptions.rb * test/ruby/test_rubyoptions.rb: use character class instead of alternation 2008-06-18 11:36:42 +00:00
test_settracefunc.rb * test/ruby/test_settracefunc.rb: add a test for set_trace_func. 2008-04-23 15:22:13 +00:00
test_shift_jis.rb * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. 2008-06-02 13:30:38 +00:00
test_signal.rb * test/ruby/test_signal.rb: add tests to achieve over 80% test 2008-05-30 13:42:23 +00:00
test_sprintf.rb * bootstraptest/test_knownbug.rb: move solved tests. 2008-05-19 05:20:21 +00:00
test_sprintf_comb.rb * prelude.rb (require_relative): move require_relative from 2008-04-12 14:50:18 +00:00
test_string.rb * string.c (rb_memhash): randomize hash to avoid algorithmic 2008-06-20 02:46:17 +00:00
test_stringchar.rb * bootstraptest/runner.rb, bootstraptest/test_method.rb, enc/depend, 2008-02-12 06:28:23 +00:00
test_struct.rb * bootstraptest/test_knownbug.rb: move solved tests. 2008-05-19 05:20:21 +00:00
test_super.rb use ML ref. for assertion message. 2007-11-18 07:18:56 +00:00
test_symbol.rb * test/ruby/test_string.rb: add tests to achieve over 90% test 2008-05-15 14:37:18 +00:00
test_system.rb * prelude.rb (require_relative): move require_relative from 2008-04-12 14:50:18 +00:00
test_thread.rb * test/ruby/test_thread.rb: add a test. 2008-06-12 15:42:14 +00:00
test_time.rb * time.c (obj2nsec): fix string argument. 2008-05-04 07:05:26 +00:00
test_trace.rb * test/ruby/test_object.rb: new tests to achieve over 90% test 2008-05-14 12:52:17 +00:00
test_transcode.rb * test/ruby/test_transcode.rb: add tests for iso-2022-jp. 2008-06-04 16:48:07 +00:00
test_unicode_escape.rb * test/ruby/test_unicode_escape.rb (test_basic): windows' echo support. 2008-06-18 11:28:27 +00:00
test_utf16.rb * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. 2008-06-02 13:30:38 +00:00
test_utf32.rb * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. 2008-06-02 13:30:38 +00:00
test_variable.rb * test/ruby/test_object.rb: new tests to achieve over 90% test 2008-05-14 12:52:17 +00:00
test_whileuntil.rb refine previous change. 2007-09-28 18:22:23 +00:00
test_windows_1251.rb * enc/iso_8859_5.c: Large omicron should lowercase to small omicron. 2008-06-02 13:30:38 +00:00
test_yield.rb * prelude.rb (require_relative): move require_relative from 2008-04-12 14:50:18 +00:00
ut_eof.rb duplicate tests removed. 2005-03-06 03:02:52 +00:00