mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ef59670a44
* st.c (hash_pos): use bitwise AND to avoid slow modulo op (new_size): power-of-two sizes for hash_pos change (st_numhash): adjust for common keys due to lack of prime modulo [Feature #9425] * hash.c (rb_any_hash): right shift for symbols * benchmark/bm_hash_aref_miss.rb: added to show improvement * benchmark/bm_hash_aref_sym_long.rb: ditto * benchmark/bm_hash_aref_str.rb: ditto * benchmark/bm_hash_aref_sym.rb: ditto * benchmark/bm_hash_ident_num.rb: added to prevent regression * benchmark/bm_hash_ident_obj.rb: ditto * benchmark/bm_hash_ident_str.rb: ditto * benchmark/bm_hash_ident_sym.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
92 lines
3.3 KiB
Text
92 lines
3.3 KiB
Text
# -*- rdoc -*-
|
|
|
|
= NEWS for Ruby 2.2.0
|
|
|
|
This document is a list of user visible feature changes made between
|
|
releases except for bug fixes.
|
|
|
|
Note that each entry is kept so brief that no reason behind or
|
|
reference information is supplied with. For a full list of changes
|
|
with all sufficient information, see the ChangeLog file.
|
|
|
|
== Changes since the 2.1.0 release
|
|
|
|
=== Language changes
|
|
|
|
=== Core classes updates (outstanding ones only)
|
|
|
|
* Enumerable
|
|
* Extended methods:
|
|
* min
|
|
* min_by
|
|
* max
|
|
* max_by
|
|
* Symbol
|
|
* New methods
|
|
* Symbol.find(str) returns whether given string is defined as symbol or not.
|
|
|
|
=== Core classes compatibility issues (excluding feature bug fixes)
|
|
|
|
* IO
|
|
* incompatible changes:
|
|
* When flushing file IO, you cannot assume that the metadata of the file
|
|
is updated immediately. On some platforms (especially Windows), it is
|
|
delayed until the filesystem load is decreased.
|
|
* Proc
|
|
* incompatible changes:
|
|
* ArgumentError is no longer raised when lambda Proc is passed as a
|
|
block, and the number of yielded arguments does not match the formal
|
|
arguments of the lambda, if just an array is yielded and its length
|
|
matches.
|
|
|
|
=== Stdlib updates (outstanding ones only)
|
|
|
|
* Find, Pathname
|
|
* Extended methods:
|
|
* find method accepts "ignore_error" keyword argument.
|
|
|
|
=== Stdlib compatibility issues (excluding feature bug fixes)
|
|
|
|
=== Built-in global variables compatibility issues
|
|
|
|
=== C API updates
|
|
|
|
* Deprecated APIs removed. [Feature #9502]
|
|
|
|
Check_SafeStr -> SafeStringValue
|
|
rb_check_safe_str -> SafeStringValue
|
|
rb_quad_pack -> rb_integer_pack
|
|
rb_quad_unpack -> rb_integer_unpack
|
|
rb_read_check : access struct FILE internal. no replacement.
|
|
rb_struct_iv_get : internal function. no replacement.
|
|
struct rb_blocking_region_buffer : internal type. no replacement.
|
|
rb_thread_blocking_region_begin -> rb_thread_call_without_gvl family
|
|
rb_thread_blocking_region_end -> rb_thread_call_without_gvl family
|
|
TRAP_BEG -> rb_thread_call_without_gvl family
|
|
TRAP_END -> rb_thread_call_without_gvl family
|
|
rb_thread_select -> rb_thread_fd_select
|
|
struct rb_exec_arg : internal type. no replacement.
|
|
rb_exec : internal function. no replacement.
|
|
rb_exec_arg_addopt : internal function. no replacement.
|
|
rb_exec_arg_fixup : internal function. no replacement.
|
|
rb_exec_arg_init : internal function. no replacement.
|
|
rb_exec_err : internal function. no replacement.
|
|
rb_fork : internal function. no replacement.
|
|
rb_fork_err : internal function. no replacement.
|
|
rb_proc_exec_n : internal function. no replacement.
|
|
rb_run_exec_options : internal function. no replacement.
|
|
rb_run_exec_options_err : internal function. no replacement.
|
|
rb_thread_blocking_region -> rb_thread_call_without_gvl family
|
|
rb_thread_polling -> rb_thread_wait_for
|
|
rb_big2str0 : internal function. no replacement.
|
|
rb_big2ulong_pack -> rb_integer_pack
|
|
rb_gc_set_params : internal function. no replacement.
|
|
|
|
* struct RBignum is hidden. [Feature #6083]
|
|
Use rb_integer_pack and rb_integer_unpack instead.
|
|
|
|
* st hash table uses power-of-two sizes for speed [Feature #9425].
|
|
Lookups are 10-25% faster if using appropriate hash functions.
|
|
However, weaknesses in hash distribution can no longer be masked
|
|
by prime number-sized tables, so extensions may need to tweak
|
|
hash functions to ensure good distribution.
|