NEWS

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 or Redmine (e.g.
https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER)

Core classes updates (outstanding ones only)

Array#max and Array#min. [Feature #12172]
This may cause a tiny incompatibility: if you redefine Enumerable#max and call
max to an Array, your redefinition will be now ignored. You should also
redefine Array#max.

Includes Ruby/OpenSSL 2.0. OpenSSL
has been extracted as a Gem and is maintained at a separate repository now:
github.com/ruby/openssl. It
still remains as a 'default gem'. [Feature #9612] Refer to
ext/openssl/History.md for the full release note.

Compatibility issues (excluding feature bug fixes)

Array#sum and Enumerable#sum are
implemented. [Feature #12217] Ruby itself has no compatibility problem
because Ruby didn't have sum method for arrays before Ruby 2.4. However
many third party gems, activesupport, facets, simple_stats, etc, defines
sum method. These implementations are mostly compatible but there are
subtle differences. Ruby's sum method should be mostly compatible but
it is impossible to be perfectly compatible with all of them.

Fixnum and Bignum are unified into Integer [Feature #12005] Fixnum class
and Bignum class is removed. Integer
class is changed from abstract class to concrete class. For example, 0 is
an instance of Integer: 0.class returns Integer. The constants Fixnum and Bignum
is bound to Integer. So
obj.kind_of?(Fixnum) works as obj.kind_of?(Integer). At C-level, Fixnum
object and Bignum object should be distinguished by FIXNUM_P(obj) and
RB_TYPE_P(obj, T_BIGNUM). RUBY_INTEGER_UNIFICATION can be used to detect
this feature at C-level. 0.class == Integer can be used to detect this
feature at Ruby-level. The C-level constants, rb_cFixnum and rb_cBignum,
are removed. They can cause compilation failure.

String/Symbol#upcase/downcase/swapcase/capitalize(!) now work for all of
Unicode, not only for ASCII. [Feature #10085] No change is needed if the
data is in ASCII anyway or if the limitation to ASCII was only tolerated
while waiting for a more extensive implementation. A change (using the
:ascii option) is needed in cases where Unicode data is processed, but the
operation has to be limited to ASCII only. A good example of this are
internationalized domain names.

C API updates

ruby_show_version() will no longer exits the process, if
RUBY_SHOW_COPYRIGHT_TO_DIE is set to 0. This will be the default in the
future.

rb_gc_adjust_memory_usage() [Feature #12690]

Supported platform changes

FreeBSD < 4 is no longer supported

Implementation improvements

In some condition, `[x, y].max` and `[x, y].min` are optimized so that a
temporal array is not created. The concrete condition is an implementation
detail: currently, the array literal must have no splat, must have at least
one expression but literal, the length must be <= 0x100, and Array#max and min must not be
redefined. It will work in most casual and real-life use case where it is
written with intent to `Math.max(x, y)`.

Miscellaneous changes

ChangeLog is removed from the repository. It is generated from commit
messages in Subversion by `make dist`. Also note that now people should
follow Git style commit message. The template is written at [Short (50
chars or less) summary of changes](git-scm.com/book/ch5-2.html).