1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/include/ruby
nobu 5714a26b90 switching hash removal
* st.h (struct st_hash_type): Remove strong_hash.
  (struct st_table): Remove inside_rebuild_p and curr_hash.
* st.c (do_hash): Use type->hash instead of curr_hash.
  (make_tab_empty): Remove setting up curr_hash.
  (st_init_table_with_size): Remove setting up inside_rebuild_p.
  (rebuild_table): Remove clearing inside_rebuild_p.
  (reset_entry_hashes, HIT_THRESHOULD_FOR_STRONG_HASH): Remove code
  recognizing a denial attack and switching to strong hash.
* hash.c (rb_dbl_long_hash, rb_objid_hash, rb_ident_hash): Use
  rb_hash_start to randomize the hash.
  (str_seed): Remove.
  (any_hash): Remove strong_p and use always rb_str_hash for
  strings.
  (any_hash_weak, rb_any_hash_weak): Remove.
  (st_hash_type objhash): Remove rb_any_hash_weak.

based on the patch by Vladimir N Makarov <vmakarov@redhat.com> at
[ruby-core:78490].  [Bug #13002]

* test/ruby/test_hash.rb (test_wrapper): objects other than special
  constants should be able to be wrapped.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-06 04:43:48 +00:00
..
backward * include/ruby/backward/util.h: Good-by Borland-C. 2015-10-18 05:41:34 +00:00
backward.h remove backward macros 2016-06-14 14:43:02 +00:00
debug.h
defines.h * include/ruby/defines.h (ALWAYS_INLINE): Add alternative definition. 2016-08-24 11:08:30 +00:00
encoding.h encoding.h: include ruby/ruby.h 2016-10-23 02:41:43 +00:00
intern.h Revert changes on rb_frame_method_id_and_class() 2016-12-04 05:40:18 +00:00
io.h * configure.in: check function attirbute const and pure, 2016-05-08 17:44:51 +00:00
missing.h missing.h: isfinite 2016-05-23 12:33:39 +00:00
oniguruma.h * regenc.h/c, include/ruby/oniguruma.h, enc/ascii.c, big5.c, cp949.c, 2016-07-24 07:33:15 +00:00
re.h re.c: rb_reg_region_copy 2014-12-01 21:30:58 +00:00
regex.h
ruby.h use rb_struct_ptr for RSTRUCT_PTR macro 2016-11-24 20:51:45 +00:00
st.h switching hash removal 2016-12-06 04:43:48 +00:00
subst.h
thread.h
thread_native.h
util.h util.h: POSIX-noncompliant setenv 2016-09-07 08:50:39 +00:00
version.h version.h (RUBY_VERSION): 2.4.0 development has started. 2015-12-25 12:40:38 +00:00
vm.h
win32.h * win32/win32.c, include/ruby/win32.h (rb_w32_utruncate): implements new 2016-05-02 14:05:19 +00:00