N -- new feature -- I may consider using it
B -- breaking change -- I should review my code
N def-expr now returns the symbol of its name instead of nil.
N Array#to_h converts an array of key-value pairs into a Hash.
N Enumerable#to_h converts a list of key-value pairs into a Hash.
N Binding#local_variable_get(symbol)
N Exception#cause provides the previous exception which has been caught at where raising the new exception.
N Fixnum#bit_length
N Fixnum#bit_length
N Numeric#step allows the limit argument to be omitted, in which case an infinite sequence of numbers is generated. Keyword arguments `to` and `by` are introduced for ease of use.
N Process.argv0() returns the original value of $0.
N String#scrub and String#scrub! verify and fix invalid byte sequence.
B Now the default values of keyword arguments can be omitted. “required keyword arguments” need giving explicitly at the call time.
B Hash#reject will return plain Hash object in the future versions, that is the original object's subclass, instance variables, default value, and taintedness will be no longer copied, so now warnings are emitted when called with such Hash.
B Now Module#define_method and Object#define_singleton_method return the symbols of the defined methods, not the methods/procs themselves.
B Returning from lambda proc now always exits from the Proc, not from the method where the lambda is created.
B If invalid: :replace is specified for String#encode, replace invalid byte sequence even if the destination encoding equals to the source encoding.
B URI.decode_www_form follows current WHATWG URL Standard. It gets encoding argument to specify the character encoding. It now allows loose percent encoded strings, but denies ;-separator.
N Symbol key followed by a colon can be quoted.
N Enumerable#slice_after
N Enumerable#slice_when
N min, min_by, max and max_by supports optional argument to return multiple elements.
N Kernel#itself
B { **hash1, **hash2 } contains values of hash2 for duplicated keys.
B Math.log now raises Math::DomainError instead of returning NaN if the base is less than 0, and returns NaN instead of -infinity if both of two arguments are 0.
B Math.atan2 now returns values like as expected by C99 if both two arguments are infinity.
B 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.
B callcc is obsolete. use Fiber instead.
B Digest::HMAC has been removed. Example edit: https://github.com/mailgun/mailgun-ruby/pull/16/files
B support RFC 3986. https://bugs.ruby-lang.org/issues/2542
B Prime.prime? now returns false for negative numbers.
N new method call syntax, `object&.foo', method #foo is called on `object' if it is not nil
N new string literal, here document starts with `<<~`
N Array#bsearch_index
N Array#dig, Hash#dig, Struct#dig
N Enumerable#grep_v and Enumerator::Lazy#grep_v is added as inverse version of #grep.
N Enumerable#chunk_while
N File.mkfifo
N Hash#fetch_values
N Hash#<=, Hash#<, Hash#>=, Hash#>
N Hash#to_proc
N Numeric#positive? and Numeric#negative?
N String#+@ and String#-@ are added to get mutable/frozen strings.
N Array#inspect, Hash#inspect doesn't raise error even if its content returns a string which is not compatible with Encoding.default_external as inspected result.
N Logger#level= now supports symbol and string levels such as :debug, :info, :warn, :error, :fatal (case insensitive)
B Array#select!, Array#keep_if, Array#reject!, and Array#delete_if no longer changes the receiver array instantly every time the block is called.
B Array#flatten and Array#flatten! no longer try to call #to_ary method on elements beyond the given level.
B Enumerable#chunk and Enumerable#slice_before no longer takes the initial_state argument. Use a local variable instead to maintain a state.
B IO#close doesn't raise when the IO object is closed.
B default value of Net::HTTP#open_timeout is now 60 (was nil).
N Toplevel return is now allowed.
N Array#sum, Enumerable#sum
N Comparable#clamp
N Float#ceil, Float#floor, Float#truncate, Float#round, Integer#ceil, Integer#floor, Integer#truncate, Integer#round now take an optional digits.
N Float#round, Integer#round, Rational#round now takes an optional keyword argument, half option, and the default behavior is round-up.
N Hash#compact, Hash#compact!
N Hash#transform_values, Hash#transform_values!
N Integer#digits for extracting columns of place-value notation
N IO#gets, IO#readline, IO#each_line, IO#readlines, IO.foreach, String#each_line, String#lines, StringIO#gets, StringIO#readline, StringIO#each_line, StringIO#readlines now takes an optional keyword argument, chomp flag.
N MatchData#named_captures
N Module#refine accepts a module as the argument now.
N String#casecmp?, Symbol#casecmp?
N String#upcase, String#downcase, String#capitalize, String#swapcase and their bang variants work for all of Unicode, and are no longer limited to ASCII.
N Symbol#upcase, Symbol#downcase, Symbol#capitalize, and Symbol#swapcase now work for all of Unicode.
N String.new(capacity: size)
N Regexp#match?, String#match?, Symbol#match? returns bool and doesn't save backref.
N Binding#irb: Start a REPL session
N Allow specifying logger parameters in constructor such as level, progname, datetime_format, formatter.
N Net::HTTP.post
B Fixnum and Bignum are unified into Integer
B DateTime#to_time and Time#to_time now preserves timezone.
N rescue/else/ensure are allowed inside do/end blocks
N Array#append and Array#prepend as aliases for #push and #unshift
N Exception#full_message to retrieve a String expression of an exception, formatted in the same way in which Ruby prints out an uncaught exception.
N Dir.children and Dir.each_child
N Enumerable#{any?,all?,none?,one?} accept a Regexp argument
N Hash#transform_keys and Hash#transform_keys!
N Hash#slice
N Integer#pow accepts modulo argument for calculating modular exponentiation.
N Integer.sqrt
N Kernel#yield_self
N Kernel#pp
N Method#=== that invokes Method#call, as same as Proc#===
N Module#{attr,attr_accessor,attr_reader,attr_writer}, Module#{define_method,alias_method,undef_method,remove_method} become public
N Process.last_status as an alias of $?
N String#start_with? accepts a regexp
N String#delete_prefix, String#delete_prefix!, String#delete_suffix, String#delete_suffix!
N Struct.new takes `keyword_init: true` option to initialize members with keyword arguments.
N Net::HTTP::STATUS_CODES is added as HTTP Status Code Repository
N URI.open method defined as an alias to open-uri's Kernel.open. open-uri's Kernel.open will be deprecated in future.
N Pathname#glob
N RbConfig::LIMITS is added to provide the limits of C types
B Integer#{round,floor,ceil,truncate} always return an Integer.
B Range#initialize no longer hides exceptions when comparing begin and end
B Relative path operations no longer collapse consecutive slashes to a single slash.