From: ts Date: 2001-12-12T02:48:13+09:00 Subject: [ruby-talk:28253] Re: Hash.keys Q >>>>> "c" == chr news@gmx net <(chr_news@gmx.net)> writes: c> The order of the keys does not depend on the hash function - void st_add_direct(table, key, value) st_table *table; char *key; char *value; { unsigned int hash_val, bin_pos; hash_val = do_hash(key, table); bin_pos = hash_val % table->num_bins; ADD_DIRECT(table, key, value, hash_val, bin_pos); } Just look what do do_hash() (hint : it call the hash function) c> however for small hashes there is a statistical trend I suspect that you have just seen the effect of modulo with num_bins Guy Decoux