From bc0ea18dbd073bea10a8f3c610bb879a31468c60 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 17 Jul 2009 04:52:22 +0000 Subject: [PATCH] * random.c (dump_mt): removed debug function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- random.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/random.c b/random.c index b0c741abb5..d9bfa9a804 100644 --- a/random.c +++ b/random.c @@ -282,18 +282,6 @@ random_alloc(VALUE klass) return obj; } -static void -dump_mt(const struct MT *mt, const char *s) -{ - int i, n = mt->next - mt->state; - static FILE *f; - if (!f) f = fopen("rand.data", "w"); - fprintf(f, "%s\nleft=%d\n", s, mt->left); - for (i = 0; i < MT_MAX_STATE; ++i) { - fprintf(f, " %s %u\n", i == n ? "*" : " ", mt->state[i]); - } -} - static VALUE rand_init(struct MT *mt, VALUE vseed) { @@ -382,7 +370,6 @@ random_init(int argc, VALUE *argv, VALUE obj) rb_scan_args(argc, argv, "01", &vseed); } rnd->seed = rand_init(&rnd->mt, vseed); - dump_mt(&rnd->mt, "random_init"); return obj; } @@ -666,7 +653,6 @@ rb_f_srand(int argc, VALUE *argv, VALUE obj) } old = default_rand.rnd.seed; default_rand.rnd.seed = rand_init(&default_rand.rnd.mt, seed); - dump_mt(&default_rand.rnd.mt, "srand"); return old; }