File: C:/Ruby27-x64/share/doc/ruby/html/NEWS-2_5_0.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>NEWS-2.5.0 - RDoc Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "./";
var index_rel_prefix = "./";
</script>
<script src="./js/navigation.js" defer></script>
<script src="./js/search.js" defer></script>
<script src="./js/search_index.js" defer></script>
<script src="./js/searcher.js" defer></script>
<script src="./js/darkfish.js" defer></script>
<link href="./css/fonts.css" rel="stylesheet">
<link href="./css/rdoc.css" rel="stylesheet">
<body id="top" role="document" class="file">
<nav role="navigation">
<div id="project-navigation">
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
<h2>
<a href="./index.html" rel="home">Home</a>
</h2>
<div id="table-of-contents-navigation">
<a href="./table_of_contents.html#pages">Pages</a>
<a href="./table_of_contents.html#classes">Classes</a>
<a href="./table_of_contents.html#methods">Methods</a>
</div>
</div>
<div id="search-section" role="search" class="project-section initially-hidden">
<form action="#" method="get" accept-charset="utf-8">
<div id="search-field-wrapper">
<input id="search-field" role="combobox" aria-label="Search"
aria-autocomplete="list" aria-controls="search-results"
type="text" name="search" placeholder="Search" spellcheck="false"
title="Type to search, Up and Down to navigate, Enter to load">
</div>
<ul id="search-results" aria-label="Search Results"
aria-busy="false" aria-expanded="false"
aria-atomic="false" class="initially-hidden"></ul>
</form>
</div>
</div>
<div class="nav-section">
<h3>Table of Contents</h3>
<ul class="link-list" role="directory">
<li><a href="#label-NEWS+for+Ruby+2.5.0">NEWS for Ruby 2.5.0</a>
<li><a href="#label-Changes+since+the+2.4.0+release">Changes since the 2.4.0 release</a>
<li><a href="#label-Language+changes">Language changes</a>
<li><a href="#label-Core+classes+updates+-28outstanding+ones+only-29">Core classes updates (outstanding ones only)</a>
<li><a href="#label-Stdlib+updates+-28outstanding+ones+only-29">Stdlib updates (outstanding ones only)</a>
<li><a href="#label-Compatibility+issues+-28excluding+feature+bug+fixes-29">Compatibility issues (excluding feature bug fixes)</a>
<li><a href="#label-Stdlib+compatibility+issues+-28excluding+feature+bug+fixes-29">Stdlib compatibility issues (excluding feature bug fixes)</a>
<li><a href="#label-Supported+platform+changes">Supported platform changes</a>
<li><a href="#label-Implementation+improvements">Implementation improvements</a>
<li><a href="#label-Miscellaneous+changes">Miscellaneous changes</a>
</ul>
</div>
<div id="project-metadata">
<div id="fileindex-section" class="nav-section">
<h3>Pages</h3>
<ul class="link-list">
<li><a href="./CONTRIBUTING_md.html">CONTRIBUTING</a>
<li><a href="./COPYING.html">COPYING</a>
<li><a href="./COPYING_ja.html">COPYING.ja</a>
<li><a href="./LEGAL.html">LEGAL</a>
<li><a href="./NEWS.html">NEWS</a>
<li><a href="./NEWS-1_8_7.html">NEWS-1.8.7</a>
<li><a href="./NEWS-1_9_1.html">NEWS-1.9.1</a>
<li><a href="./NEWS-1_9_2.html">NEWS-1.9.2</a>
<li><a href="./NEWS-1_9_3.html">NEWS-1.9.3</a>
<li><a href="./NEWS-2_0_0.html">NEWS-2.0.0</a>
<li><a href="./NEWS-2_1_0.html">NEWS-2.1.0</a>
<li><a href="./NEWS-2_2_0.html">NEWS-2.2.0</a>
<li><a href="./NEWS-2_3_0.html">NEWS-2.3.0</a>
<li><a href="./NEWS-2_4_0.html">NEWS-2.4.0</a>
<li><a href="./NEWS-2_5_0.html">NEWS-2.5.0</a>
<li><a href="./NEWS-2_6_0.html">NEWS-2.6.0</a>
<li><a href="./README_ja_md.html">README.ja</a>
<li><a href="./README_md.html">README</a>
<li><a href="./bug_triaging_rdoc.html">bug_triaging</a>
<li><a href="./contributing_rdoc.html">contributing</a>
<li><a href="./contributors_rdoc.html">contributors</a>
<li><a href="./dtrace_probes_rdoc.html">dtrace_probes</a>
<li><a href="./extension_ja_rdoc.html">extension.ja</a>
<li><a href="./extension_rdoc.html">extension</a>
<li><a href="./globals_rdoc.html">globals</a>
<li><a href="./keywords_rdoc.html">keywords</a>
<li><a href="./lib/racc/pre-setup.html">pre-setup</a>
<li><a href="./lib/racc/rdoc/grammar_en_rdoc.html">grammar.en</a>
<li><a href="./maintainers_rdoc.html">maintainers</a>
<li><a href="./marshal_rdoc.html">marshal</a>
<li><a href="./regexp_rdoc.html">regexp</a>
<li><a href="./security_rdoc.html">security</a>
<li><a href="./signals_rdoc.html">signals</a>
<li><a href="./standard_library_rdoc.html">standard_library</a>
<li><a href="./syntax_rdoc.html">syntax</a>
<li><a href="./syntax/assignment_rdoc.html">assignment</a>
<li><a href="./syntax/calling_methods_rdoc.html">calling_methods</a>
<li><a href="./syntax/comments_rdoc.html">comments</a>
<li><a href="./syntax/control_expressions_rdoc.html">control_expressions</a>
<li><a href="./syntax/exceptions_rdoc.html">exceptions</a>
<li><a href="./syntax/literals_rdoc.html">literals</a>
<li><a href="./syntax/methods_rdoc.html">methods</a>
<li><a href="./syntax/miscellaneous_rdoc.html">miscellaneous</a>
<li><a href="./syntax/modules_and_classes_rdoc.html">modules_and_classes</a>
<li><a href="./syntax/precedence_rdoc.html">precedence</a>
<li><a href="./syntax/refinements_rdoc.html">refinements</a>
<li><a href="./win32/README_win32.html">README.win32</a>
</ul>
</div>
</div>
</nav>
<main role="main" aria-label="Page NEWS-2.5.0">
<h1 id="label-NEWS+for+Ruby+2.5.0"><a href="NEWS.html">NEWS</a> for Ruby 2.5.0<span><a href="#label-NEWS+for+Ruby+2.5.0">¶</a> <a href="#top">↑</a></span></h1>
<p>This document is a list of user visible feature changes made between releases except for bug fixes.</p>
<p>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. <code>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</code>)</p>
<h2 id="label-Changes+since+the+2.4.0+release">Changes since the 2.4.0 release<span><a href="#label-Changes+since+the+2.4.0+release">¶</a> <a href="#top">↑</a></span></h2>
<h3 id="label-Language+changes">Language changes<span><a href="#label-Language+changes">¶</a> <a href="#top">↑</a></span></h3>
<ul><li>
<p>Top-level constant look-up is removed. [Feature #11547]</p>
</li><li>
<p>rescue/else/ensure are allowed inside do/end blocks. [Feature #12906]</p>
</li><li>
<p>refinements take place in string interpolations. [Feature #13812]</p>
</li></ul>
<h3 id="label-Core+classes+updates+-28outstanding+ones+only-29">Core classes updates (outstanding ones only)<span><a href="#label-Core+classes+updates+-28outstanding+ones+only-29">¶</a> <a href="#top">↑</a></span></h3>
<ul><li>
<p><a href="Array.html"><code>Array</code></a></p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p><a href="Array.html#method-i-append"><code>Array#append</code></a> [Feature #12746]</p>
</li><li>
<p><a href="Array.html#method-i-prepend"><code>Array#prepend</code></a> [Feature #12746]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="Data.html"><code>Data</code></a></p>
<ul><li>
<p>Is deprecated. It was a base class for C extensions, and it's not necessary to expose in Ruby level. [Feature #3072]</p>
</li></ul>
</li><li>
<p><a href="Exception.html"><code>Exception</code></a></p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p><a href="Exception.html#method-i-full_message"><code>Exception#full_message</code></a> to retrieve a <a href="String.html"><code>String</code></a> expression of an exception, formatted in the same way in which Ruby prints out an uncaught exception. [Feature #14141] [experimental]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="Dir.html"><code>Dir</code></a></p>
<ul><li>
<p><a href="Dir.html#method-c-glob"><code>Dir.glob</code></a> provides new optional keyword argument, <code>:base</code> . [Feature #13056]</p>
</li><li>
<p><a href="Dir.html#method-c-chdir"><code>Dir.chdir</code></a> (without block arg), <a href="Dir.html#method-c-open"><code>Dir.open</code></a>, <a href="Dir.html#method-c-new"><code>Dir.new</code></a>, <a href="Dir.html#method-c-mkdir"><code>Dir.mkdir</code></a>, <a href="Dir.html#method-c-rmdir"><code>Dir.rmdir</code></a>, <a href="Dir.html#method-c-empty-3F"><code>Dir.empty?</code></a> releases GVL</p>
</li><li>
<p>New methods:</p>
<ul><li>
<p><a href="Dir.html#method-c-children"><code>Dir.children</code></a> [Feature #11302]</p>
</li><li>
<p><a href="Dir.html#method-c-each_child"><code>Dir.each_child</code></a> [Feature #11302]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="Enumerable.html"><code>Enumerable</code></a></p>
<ul><li>
<p><a href="Enumerable.html#method-i-any-3F"><code>Enumerable#any?</code></a>, <a href="Enumerable.html#method-i-all-3F"><code>Enumerable#all?</code></a>, <a href="Enumerable.html#method-i-none-3F"><code>Enumerable#none?</code></a> and <a href="Enumerable.html#method-i-one-3F"><code>Enumerable#one?</code></a> accept a pattern argument. [Feature #11286]</p>
</li></ul>
</li><li>
<p><a href="File.html"><code>File</code></a></p>
<ul><li>
<p><a href="File.html#method-c-open"><code>File.open</code></a> accepts <code>:newline</code> option to imply text mode. [Bug #13350]</p>
</li><li>
<p><a href="File.html#method-i-path"><code>File#path</code></a> raises an <a href="IOError.html"><code>IOError</code></a> for files opened with File::Constants::TMPFILE option. [Feature #13568]</p>
</li><li>
<p><a href="File.html#method-c-stat"><code>File.stat</code></a>, <a href="File.html#method-c-exist-3F"><code>File.exist?</code></a> and other <code>rb_stat()</code>-using methods release GVL. [Bug #13941]</p>
</li><li>
<p><a href="File.html#method-c-rename"><code>File.rename</code></a> releases GVL. [Feature #13951]</p>
</li><li>
<p><a href="File/Stat.html#method-i-atime"><code>File::Stat#atime</code></a>, <a href="File/Stat.html#method-i-mtime"><code>File::Stat#mtime</code></a> and <a href="File/Stat.html#method-i-ctime"><code>File::Stat#ctime</code></a> support fractional second timestamps on Windows 8 and later. [Feature #13726]</p>
</li><li>
<p><a href="File/Stat.html#method-i-ino"><code>File::Stat#ino</code></a> and <a href="File.html#method-c-identical-3F"><code>File.identical?</code></a> support ReFS 128bit ino on Windows 8.1 and later. [Feature #13731]</p>
</li><li>
<p><a href="File.html#method-c-readable-3F"><code>File.readable?</code></a>, <a href="File.html#method-c-readable_real-3F"><code>File.readable_real?</code></a>, <a href="File.html#method-c-writable-3F"><code>File.writable?</code></a>, <a href="File.html#method-c-writable_real-3F"><code>File.writable_real?</code></a>, <a href="File.html#method-c-executable-3F"><code>File.executable?</code></a>, <a href="File.html#method-c-executable_real-3F"><code>File.executable_real?</code></a>, <a href="File.html#method-c-mkfifo"><code>File.mkfifo</code></a>, <a href="File.html#method-c-readlink"><code>File.readlink</code></a>, <a href="File.html#method-c-truncate"><code>File.truncate</code></a>, <a href="File.html#method-i-truncate"><code>File#truncate</code></a>, <a href="File.html#method-c-chmod"><code>File.chmod</code></a>, <a href="File.html#method-c-lchmod"><code>File.lchmod</code></a>, <a href="File.html#method-c-chown"><code>File.chown</code></a>, <a href="File.html#method-c-lchown"><code>File.lchown</code></a>, <a href="File.html#method-c-unlink"><code>File.unlink</code></a>, <a href="File.html#method-c-utime"><code>File.utime</code></a>, <a href="File.html#method-c-lstat"><code>File.lstat</code></a> release GVL</p>
</li><li>
<p>New method:</p>
<ul><li>
<p><a href="File.html#method-c-lutime"><code>File.lutime</code></a> [Feature #4052]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="Hash.html"><code>Hash</code></a></p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p><a href="Hash.html#method-i-transform_keys"><code>Hash#transform_keys</code></a> [Feature #13583]</p>
</li><li>
<p><a href="Hash.html#method-i-transform_keys-21"><code>Hash#transform_keys!</code></a> [Feature #13583]</p>
</li><li>
<p><a href="Hash.html#method-i-slice"><code>Hash#slice</code></a> [Feature #8499]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="IO.html"><code>IO</code></a></p>
<ul><li>
<p><a href="IO.html#method-c-copy_stream"><code>IO.copy_stream</code></a> tries copy offload with copy_file_range(2) [Feature #13867]</p>
</li><li>
<p>New methods:</p>
<ul><li>
<p><a href="IO.html#method-i-pread"><code>IO#pread</code></a> [Feature #4532]</p>
</li><li>
<p><a href="IO.html#method-i-pwrite"><code>IO#pwrite</code></a> [Feature #4532]</p>
</li><li>
<p><a href="IO.html#method-i-write"><code>IO#write</code></a> accepts multiple arguments [Feature #9323]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="IOError.html"><code>IOError</code></a></p>
<ul><li>
<p><a href="IO.html#method-i-close"><code>IO#close</code></a> might raise an error with message “stream closed”, but it is refined to “stream closed in another thread”. The new message is more clear for user. [Bug #13405]</p>
</li></ul>
</li><li>
<p><a href="Integer.html"><code>Integer</code></a></p>
<ul><li>
<p><a href="Integer.html#method-i-round"><code>Integer#round</code></a>, <a href="Integer.html#method-i-floor"><code>Integer#floor</code></a>, <a href="Integer.html#method-i-ceil"><code>Integer#ceil</code></a> and <a href="Integer.html#method-i-truncate"><code>Integer#truncate</code></a> always return an <a href="Integer.html"><code>Integer</code></a>. [Bug #13420]</p>
</li><li>
<p><a href="Integer.html#method-i-pow"><code>Integer#pow</code></a> accepts modulo argument for calculating modular exponentiation. [Feature #12508] [Feature #11003]</p>
</li><li>
<p>New methods:</p>
<ul><li>
<p><a href="Integer.html#method-i-allbits-3F"><code>Integer#allbits?</code></a>, <a href="Integer.html#method-i-anybits-3F"><code>Integer#anybits?</code></a>, <a href="Integer.html#method-i-nobits-3F"><code>Integer#nobits?</code></a> [Feature #12753]</p>
</li><li>
<p><a href="Integer.html#method-c-sqrt"><code>Integer.sqrt</code></a> [Feature #13219]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="Kernel.html"><code>Kernel</code></a></p>
<ul><li>
<p>Kernel#yield_self [Feature #6721]</p>
</li><li>
<p><a href="Kernel.html#method-i-pp"><code>Kernel#pp</code></a> [Feature #14123]</p>
</li><li>
<p><a href="Kernel.html#method-i-warn"><code>Kernel#warn</code></a>(…, uplevel:n) [Feature #12882]</p>
</li></ul>
</li><li>
<p><a href="Method.html"><code>Method</code></a></p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p><a href="Method.html#method-i-3D-3D-3D"><code>Method#===</code></a> that invokes <a href="Method.html#method-i-call"><code>Method#call</code></a>, as same as <a href="Proc.html#method-i-3D-3D-3D"><code>Proc#===</code></a> [Feature #14142]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="Module.html"><code>Module</code></a></p>
<ul><li>
<p><a href="Module.html#method-i-attr"><code>Module#attr</code></a>, <a href="Module.html#method-i-attr_accessor"><code>Module#attr_accessor</code></a>, <a href="Module.html#method-i-attr_reader"><code>Module#attr_reader</code></a> and <a href="Module.html#method-i-attr_writer"><code>Module#attr_writer</code></a> become public. [Feature #14132]</p>
</li><li>
<p><a href="Module.html#method-i-define_method"><code>Module#define_method</code></a>, <a href="Module.html#method-i-alias_method"><code>Module#alias_method</code></a>, <a href="Module.html#method-i-undef_method"><code>Module#undef_method</code></a> and <a href="Module.html#method-i-remove_method"><code>Module#remove_method</code></a> become public. [Feature #14133]</p>
</li></ul>
</li><li>
<p><a href="Numeric.html"><code>Numeric</code></a></p>
<ul><li>
<p><a href="Numeric.html#method-i-step"><code>Numeric#step</code></a> no longer hides errors from coerce method when given a step value which cannot be compared with #> to 0. [Feature #7688]</p>
</li><li>
<p>Numerical comparison operators (<,<=,>=,>) no longer hide exceptions from coerce method internally. Return nil in coerce if the coercion is impossible. [Feature #7688]</p>
</li></ul>
</li><li>
<p><a href="Process.html"><code>Process</code></a></p>
<ul><li>
<p>Precision of <a href="Process.html#method-c-times"><code>Process.times</code></a> is improved if getrusage(2) exists. [Feature #11952]</p>
</li><li>
<p>New method:</p>
<ul><li>
<p><a href="Process.html#method-c-last_status"><code>Process.last_status</code></a> as an alias of $? [Feature #14043]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="Range.html"><code>Range</code></a></p>
<ul><li>
<p>Range#initialize no longer hides exceptions when comparing begin and end with #<=> and raise a “bad value for range” <a href="ArgumentError.html"><code>ArgumentError</code></a> but instead lets the exception from the #<=> call go through. [Feature #7688]</p>
</li></ul>
</li><li>
<p><a href="Regexp.html"><code>Regexp</code></a></p>
<ul><li>
<p>Update to Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05.</p>
<ul><li>
<p>Support absence operator <a href="https://github.com/k-takata/Onigmo/issues/82">github.com/k-takata/Onigmo/issues/82</a></p>
</li></ul>
</li><li>
<p>Support new 5 emoji-related Unicode character properties</p>
</li></ul>
</li><li>
<p><a href="RubyVM/InstructionSequence.html"><code>RubyVM::InstructionSequence</code></a></p>
<ul><li>
<p>New method:</p>
<ul><li>
<p><a href="RubyVM/InstructionSequence.html#method-i-each_child"><code>RubyVM::InstructionSequence#each_child</code></a></p>
</li><li>
<p><a href="RubyVM/InstructionSequence.html#method-i-trace_points"><code>RubyVM::InstructionSequence#trace_points</code></a></p>
</li></ul>
</li></ul>
</li><li>
<p><a href="String.html"><code>String</code></a></p>
<ul><li>
<p><code>String#-@</code> deduplicates unfrozen strings. Already-frozen strings remain unchanged for compatibility. [Feature #13077]</p>
</li><li>
<p><code>-"literal"</code> (<code>String#-@</code>) optimized to return the same object (same as <code>"literal".freeze</code> in Ruby 2.1+) [Feature #13295]</p>
</li><li>
<p><a href="String.html#method-i-casecmp"><code>String#casecmp</code></a> and <a href="String.html#method-i-casecmp-3F"><code>String#casecmp?</code></a> return nil for non-string arguments instead of raising a <a href="TypeError.html"><code>TypeError</code></a>. [Bug #13312]</p>
</li><li>
<p><a href="String.html#method-i-start_with-3F"><code>String#start_with?</code></a> accepts a regexp [Feature #13712]</p>
</li><li>
<p>New methods:</p>
<ul><li>
<p><a href="String.html#method-i-delete_prefix"><code>String#delete_prefix</code></a>, <a href="String.html#method-i-delete_prefix-21"><code>String#delete_prefix!</code></a> [Feature #12694]</p>
</li><li>
<p><a href="String.html#method-i-delete_suffix"><code>String#delete_suffix</code></a>, <a href="String.html#method-i-delete_suffix-21"><code>String#delete_suffix!</code></a> [Feature #13665]</p>
</li><li>
<p><a href="String.html#method-i-each_grapheme_cluster"><code>String#each_grapheme_cluster</code></a> and <a href="String.html#method-i-grapheme_clusters"><code>String#grapheme_clusters</code></a> to enumerate grapheme clusters [Feature #13780]</p>
</li><li>
<p><a href="String.html#method-i-undump"><code>String#undump</code></a> to unescape <a href="String.html#method-i-dump"><code>String#dump</code></a>'ed string [Feature #12275]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="Struct.html"><code>Struct</code></a></p>
<ul><li>
<p><a href="Struct.html#method-c-new"><code>Struct.new</code></a> takes `keyword_init: true` option to initialize members with keyword arguments. [Feature #11925]</p>
</li></ul>
</li><li>
<p>Regexp/String: Update Unicode version from 9.0.0 to 10.0.0 [Feature #13685]</p>
</li><li>
<p><a href="Thread.html"><code>Thread</code></a></p>
<ul><li>
<p>Description set by <a href="Thread.html#method-i-name-3D"><code>Thread#name=</code></a> is now visible on Windows 10.</p>
</li><li>
<p>New method:</p>
<ul><li>
<p><a href="Thread.html#method-i-fetch"><code>Thread#fetch</code></a> [Feature #13009]</p>
</li></ul>
</li><li>
<p>The default of <a href="Thread.html#method-c-report_on_exception"><code>Thread.report_on_exception</code></a> is now true, showing unhandled exceptions terminating threads on $stderr. [Feature #14143]</p>
</li></ul>
</li><li>
<p><a href="Time.html"><code>Time</code></a></p>
<ul><li>
<p><a href="Time.html#method-c-at"><code>Time.at</code></a> receives 3rd argument which specifies the unit of 2nd argument. [Feature #13919]</p>
</li></ul>
</li><li>
<p><a href="KeyError.html"><code>KeyError</code></a></p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p><a href="KeyError.html#method-i-receiver"><code>KeyError#receiver</code></a> [Feature #12063]</p>
</li><li>
<p><a href="KeyError.html#method-i-key"><code>KeyError#key</code></a> [Feature #12063]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="FrozenError.html"><code>FrozenError</code></a></p>
<ul><li>
<p>New exception class. [Feature #13224]</p>
</li></ul>
</li></ul>
<h3 id="label-Stdlib+updates+-28outstanding+ones+only-29">Stdlib updates (outstanding ones only)<span><a href="#label-Stdlib+updates+-28outstanding+ones+only-29">¶</a> <a href="#top">↑</a></span></h3>
<ul><li>
<p><a href="BigDecimal.html"><code>BigDecimal</code></a></p>
<ul><li>
<p>Update to <a href="BigDecimal.html"><code>BigDecimal</code></a> 1.3.4</p>
</li><li>
<p>The following features are added:</p>
<ul><li>
<p>BigDecimal::VERSION</p>
</li></ul>
</li><li>
<p>The following features have been deprecated, and are planned to be removed in the version 1.4.0:</p>
<ul><li>
<p><a href="BasicObject.html#method-c-new"><code>BigDecimal.new</code></a></p>
</li><li>
<p>BigDecimal.ver</p>
</li></ul>
</li><li>
<p><a href="BigDecimal.html#method-i-clone"><code>BigDecimal#clone</code></a> and dup now do not make a new instance, but returns the receiver itself.</p>
</li></ul>
</li><li>
<p><a href="Coverage.html"><code>Coverage</code></a></p>
<ul><li>
<p>Support branch coverage and method coverage measurement. [Feature #13901] Branch coverage tells you which branches are executed, and which not. <a href="Method.html"><code>Method</code></a> coverage tells you which methods are invoked, and which not. By running a test suite with this new feature, you can know which branches and methods are executed by a test, and evaluate total coverage of a test suite more strictly.</p>
<p>You can specify the measuring target by an option to `Coverage.start`:</p>
<pre class="ruby"><span class="ruby-constant">Coverage</span>.<span class="ruby-identifier">start</span>(<span class="ruby-value">lines:</span> <span class="ruby-keyword">true</span>, <span class="ruby-value">branches:</span> <span class="ruby-keyword">true</span>, <span class="ruby-value">methods:</span> <span class="ruby-keyword">true</span>)
</pre>
<p>After some Ruby files are loaded, you can use `Coverage.result` to get the coverage result:</p>
<pre class="ruby"><span class="ruby-constant">Coverage</span>.<span class="ruby-identifier">result</span>
<span class="ruby-comment">#=> { "/path/to/file.rb"=></span>
<span class="ruby-comment"># { :lines => [1, 2, 0, nil, ...],</span>
<span class="ruby-comment"># :branches =></span>
<span class="ruby-comment"># { [:if, 0, 2, 1, 6, 4] =></span>
<span class="ruby-comment"># { [:then, 1, 3, 2, 3, 8] => 0,</span>
<span class="ruby-comment"># [:else, 2, 5, 2, 5, 8] => 2</span>
<span class="ruby-comment"># }</span>
<span class="ruby-comment"># },</span>
<span class="ruby-comment"># :methods => {</span>
<span class="ruby-comment"># [Object, :foo, 1, 0, 7, 3] => 2</span>
<span class="ruby-comment"># }</span>
<span class="ruby-comment"># }</span>
<span class="ruby-comment"># }</span>
</pre>
<p>The result type of line coverage is not changed; it is just an array that contains numbers, which means the count that each line was executed, or `nil`s, which means that the line is not relevant.</p>
<p>The result type of branch coverage is:</p>
<pre class="ruby">{ (<span class="ruby-identifier">jump</span> <span class="ruby-identifier">base</span>) <span class="ruby-operator">=></span> { (<span class="ruby-identifier">jump</span> <span class="ruby-identifier">target</span>) <span class="ruby-operator">=></span> (<span class="ruby-identifier">counter</span>) } }
</pre>
<p>where jump base and targets have the format</p>
<pre>[type, unique-id, start lineno, start column, end lineno, end column]</pre>
<p>For example, `[:if, 0, 2, 1, 6, 4]` reads an `if` statement that ranges from line 2 and column 1, to line 6 and column 4. `[:then, 1, 3, 2, 3, 8]` reads a `then` clause that ranges from line 3 and column 2, to line 3 and column 8. Note that lineno starts from 1, and that columnno starts from 0. So, the above example shows a branch from the `if` to the `then` was never executed, and a branch from the `if` to the `else` was executed twice.</p>
<p>The result type of method coverage is:</p>
<pre class="ruby">{ (<span class="ruby-identifier">method</span> <span class="ruby-identifier">key</span>) <span class="ruby-operator">=></span> (<span class="ruby-identifier">counter</span>) }
</pre>
<p>where method key has the format</p>
<pre>[class, method-name, start lineno, start column, end lineno, end column]</pre>
<p>For example, `[Object, :foo, 1, 0, 7, 3]` reads `Object#foo` that ranges from line 1 and column 0, to line 7 and column 3. The above example shows this `Object#foo` was invoked twice.</p>
<p>Note: To keep compatibility, passing no option to `Coverage.start` will measure only line coverage, and `Coverage.result` will return the old format:</p>
<pre class="ruby"><span class="ruby-constant">Coverage</span>.<span class="ruby-identifier">result</span>
<span class="ruby-comment">#=> { "/path/to/file.rb"=> [1, 2, 0, nil, ...] }</span>
</pre>
</li></ul>
</li><li>
<p><a href="DRb.html"><code>DRb</code></a></p>
<ul><li>
<p><a href="ACL/ACLEntry.html#method-c-new"><code>ACL::ACLEntry.new</code></a> no longer suppresses <a href="IPAddr/InvalidPrefixError.html"><code>IPAddr::InvalidPrefixError</code></a>.</p>
</li></ul>
</li><li>
<p><a href="ERB.html"><code>ERB</code></a></p>
<ul><li>
<p>Add <a href="ERB.html#method-i-result_with_hash"><code>ERB#result_with_hash</code></a> to render a template with local variables passed with a <a href="Hash.html"><code>Hash</code></a> object. [Feature #8631]</p>
</li><li>
<p>Default template file encoding is changed from ASCII-8BIT to UTF-8 in erb command. [Bug #14095]</p>
</li><li>
<p>Carriage returns are changed to be trimmed properly if trim_mode is specified and used. Duplicated newlines will be removed on Windows. [Bug #5339] [Bug #11464]</p>
</li></ul>
</li><li>
<p><a href="IPAddr.html"><code>IPAddr</code></a></p>
<ul><li>
<p><a href="IPAddr.html"><code>IPAddr</code></a> no longer accepts invalid address mask. [Bug #13399]</p>
</li><li>
<p><a href="IPAddr.html#method-i-ipv4_compat"><code>IPAddr#ipv4_compat</code></a> and <a href="IPAddr.html#method-i-ipv4_compat-3F"><code>IPAddr#ipv4_compat?</code></a> are marked for deprecation. [Bug #13769]</p>
</li><li>
<p>New methods:</p>
<ul><li>
<p><a href="IPAddr.html#method-i-prefix"><code>IPAddr#prefix</code></a></p>
</li><li>
<p><a href="IPAddr.html#method-i-loopback-3F"><code>IPAddr#loopback?</code></a></p>
</li><li>
<p><a href="IPAddr.html#method-i-private-3F"><code>IPAddr#private?</code></a> [Feature #11666]</p>
</li><li>
<p><a href="IPAddr.html#method-i-link_local-3F"><code>IPAddr#link_local?</code></a> [Feature #10912]</p>
</li></ul>
</li></ul>
</li><li>
<p>IRB</p>
<ul><li>
<p>Print backtrace and error message in reverse order [Feature #8661] [experimental]</p>
</li><li>
<p>`binding.irb` automatically requires irb and runs [Bug #13099] [experimental]</p>
</li><li>
<p>`binding.irb` on its start shows source around the line where it was called [Feature #14124]</p>
</li></ul>
</li><li>
<p><a href="Matrix.html"><code>Matrix</code></a></p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p><a href="Matrix.html#method-c-combine"><code>Matrix.combine</code></a> and <a href="Matrix.html#method-i-combine"><code>Matrix#combine</code></a> [Feature #10903]</p>
</li><li>
<p><a href="Matrix.html#method-i-hadamard_product"><code>Matrix#hadamard_product</code></a> and <a href="Matrix.html#method-i-entrywise_product"><code>Matrix#entrywise_product</code></a></p>
</li></ul>
</li></ul>
</li><li>
<p><a href="Net/HTTP.html"><code>Net::HTTP</code></a></p>
<ul><li>
<p><a href="Net/HTTP.html#method-c-new"><code>Net::HTTP.new</code></a> supports no_proxy parameter [Feature #11195]</p>
</li><li>
<p><a href="Net/HTTP.html#attribute-i-min_version"><code>Net::HTTP#min_version</code></a> and <a href="Net/HTTP.html#attribute-i-max_version"><code>Net::HTTP#max_version</code></a> [Feature #9450]</p>
</li><li>
<p>Add more HTTP status classes</p>
</li><li>
<p>Net::HTTP::STATUS_CODES is added as HTTP Status Code Repository [Misc #12935]</p>
</li><li>
<p><a href="Net/HTTP.html#method-i-proxy_user"><code>Net::HTTP#proxy_user</code></a> and <a href="Net/HTTP.html#method-i-proxy_pass"><code>Net::HTTP#proxy_pass</code></a> reflect http_proxy environment variable if the system's environment variable is multiuser safe. [Bug #12921]</p>
</li></ul>
</li><li>
<p>open-uri</p>
<ul><li>
<p><a href="URI.html#method-c-open"><code>URI.open</code></a> method defined as an alias to open-uri's <a href="Kernel.html#method-c-open"><code>Kernel.open</code></a>. open-uri's <a href="Kernel.html#method-c-open"><code>Kernel.open</code></a> will be deprecated in future.</p>
</li></ul>
</li><li>
<p><a href="OpenSSL.html"><code>OpenSSL</code></a></p>
<ul><li>
<p>Updated Ruby/OpenSSL from version 2.0 to 2.1. Changes are noted in “Version 2.1.0” section in ext/openssl/History.md.</p>
</li></ul>
</li><li>
<p><a href="Pathname.html"><code>Pathname</code></a></p>
<ul><li>
<p>New method:</p>
<ul><li>
<p><a href="Pathname.html#method-i-glob"><code>Pathname#glob</code></a> [Feature #7360]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="Psych.html"><code>Psych</code></a></p>
<ul><li>
<p>Update to <a href="Psych.html"><code>Psych</code></a> 3.0.2.</p>
<ul><li>
<p>Convert fallback option to a keyword argument <a href="https://github.com/ruby/psych/pull/342">github.com/ruby/psych/pull/342</a></p>
</li><li>
<p>Add :symbolize_names option to <a href="Psych.html#method-c-load"><code>Psych.load</code></a>, <a href="Psych.html#method-c-safe_load"><code>Psych.safe_load</code></a> like <a href="JSON.html#method-i-parse"><code>JSON.parse</code></a> <a href="https://github.com/ruby/psych/pull/333">github.com/ruby/psych/pull/333</a>, <a href="https://github.com/ruby/psych/pull/337">github.com/ruby/psych/pull/337</a></p>
</li><li>
<p>Add <a href="Psych/Handler.html#method-i-event_location"><code>Psych::Handler#event_location</code></a> <a href="https://github.com/ruby/psych/pull/326">github.com/ruby/psych/pull/326</a></p>
</li><li>
<p>Make frozen string literal = true <a href="https://github.com/ruby/psych/pull/320">github.com/ruby/psych/pull/320</a></p>
</li><li>
<p>Preserve time zone offset when deserializing times <a href="https://github.com/ruby/psych/pull/316">github.com/ruby/psych/pull/316</a></p>
</li><li>
<p>Remove deprecated method aliases for syck gem <a href="https://github.com/ruby/psych/pull/312">github.com/ruby/psych/pull/312</a></p>
</li></ul>
</li></ul>
</li><li>
<p>RbConfig</p>
<ul><li>
<p>RbConfig::LIMITS is added to provide the limits of C types. This is available when rbconfig/sizeof is loaded.</p>
</li></ul>
</li><li>
<p><a href="Ripper.html"><code>Ripper</code></a></p>
<ul><li>
<p>Ripper::EXPR_BEG and so on for <a href="Ripper.html#method-i-state"><code>Ripper#state</code></a>.</p>
</li><li>
<p>New method:</p>
<ul><li>
<p><a href="Ripper.html#method-i-state"><code>Ripper#state</code></a> to tell the state of scanner. [Feature #13686]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="RDoc.html"><code>RDoc</code></a></p>
<ul><li>
<p>Update to <a href="RDoc.html"><code>RDoc</code></a> 6.0.1.</p>
<ul><li>
<p>Replace IRB based lexer with <a href="Ripper.html"><code>Ripper</code></a>.</p>
<ul><li>
<p><a href="https://github.com/ruby/rdoc/pull/512">github.com/ruby/rdoc/pull/512</a></p>
</li><li>
<p>This much improves the speed of generating documents.</p>
</li><li>
<p>It also facilitates supporting new syntax in the future.</p>
</li></ul>
</li><li>
<p>Support many new syntaxes of Ruby from the past few years.</p>
</li><li>
<p>Use “frozen_string_literal: true”. Performance survey: <a href="https://gist.github.com/aycabta/abdfaa75ea8a6877eeb734e942e73800">gist.github.com/aycabta/abdfaa75ea8a6877eeb734e942e73800</a></p>
</li><li>
<p>Support did_you_mean.</p>
</li></ul>
</li></ul>
</li><li>
<p>Rubygems</p>
<ul><li>
<p>Update to Rubygems 2.7.3.</p>
<ul><li>
<p><a href="http://blog.rubygems.org/2017/11/28/2.7.3-released.html">blog.rubygems.org/2017/11/28/2.7.3-released.html</a></p>
</li><li>
<p><a href="http://blog.rubygems.org/2017/11/08/2.7.2-released.html">blog.rubygems.org/2017/11/08/2.7.2-released.html</a></p>
</li><li>
<p><a href="http://blog.rubygems.org/2017/11/03/2.7.1-released.html">blog.rubygems.org/2017/11/03/2.7.1-released.html</a></p>
</li><li>
<p><a href="http://blog.rubygems.org/2017/11/01/2.7.0-released.html">blog.rubygems.org/2017/11/01/2.7.0-released.html</a></p>
</li><li>
<p><a href="http://blog.rubygems.org/2017/10/09/2.6.14-released.html">blog.rubygems.org/2017/10/09/2.6.14-released.html</a></p>
</li><li>
<p><a href="http://blog.rubygems.org/2017/08/27/2.6.13-released.html">blog.rubygems.org/2017/08/27/2.6.13-released.html</a></p>
</li></ul>
</li></ul>
</li><li>
<p><a href="SecureRandom.html"><code>SecureRandom</code></a></p>
<ul><li>
<p>New method:</p>
<ul><li>
<p>SecureRandom.alphanumeric</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="Set.html"><code>Set</code></a></p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p><a href="Set.html#method-i-to_s"><code>Set#to_s</code></a> as alias to inspect [Feature #13676]</p>
</li><li>
<p><a href="Set.html#method-i-3D-3D-3D"><code>Set#===</code></a> as alias to include? [Feature #13801]</p>
</li><li>
<p><a href="Set.html#method-i-reset"><code>Set#reset</code></a> [Feature #6589]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="StringIO.html"><code>StringIO</code></a></p>
<ul><li>
<p><a href="StringIO.html#method-i-write"><code>StringIO#write</code></a> accepts multiple arguments</p>
</li></ul>
</li><li>
<p><a href="StringScanner.html"><code>StringScanner</code></a></p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p><a href="StringScanner.html#method-i-size"><code>StringScanner#size</code></a>, <a href="StringScanner.html#method-i-captures"><code>StringScanner#captures</code></a>, <a href="StringScanner.html#method-i-values_at"><code>StringScanner#values_at</code></a> [Feature #836]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="URI.html"><code>URI</code></a></p>
<ul><li>
<p>Relative path operations no longer collapse consecutive slashes to a single slash. [Bug #8352]</p>
</li></ul>
</li><li>
<p><a href="WEBrick.html"><code>WEBrick</code></a></p>
<ul><li>
<p>Add Server Name Indication (SNI) support [Feature #13729]</p>
</li><li>
<p>support <a href="Proc.html"><code>Proc</code></a> objects as body responses [Feature #855]</p>
</li><li>
<p>released as a RubyGem [Feature #13173]</p>
</li><li>
<p>avoid unintended behavior from <a href="Kernel.html#method-i-open"><code>Kernel#open</code></a> [Misc #14216]</p>
</li></ul>
</li><li>
<p><a href="Zlib.html"><code>Zlib</code></a></p>
<ul><li>
<p><a href="Zlib/GzipWriter.html#method-i-write"><code>Zlib::GzipWriter#write</code></a> accepts multiple arguments</p>
</li></ul>
</li></ul>
<h3 id="label-Compatibility+issues+-28excluding+feature+bug+fixes-29">Compatibility issues (excluding feature bug fixes)<span><a href="#label-Compatibility+issues+-28excluding+feature+bug+fixes-29">¶</a> <a href="#top">↑</a></span></h3>
<ul><li>
<p><a href="Socket.html"><code>Socket</code></a></p>
<ul><li>
<p><a href="IO.html#method-i-read_nonblock"><code>BasicSocket#read_nonblock</code></a> and <a href="IO.html#method-i-write_nonblock"><code>BasicSocket#write_nonblock</code></a> no longer set the O_NONBLOCK file description flag as side effect (on Linux only) [Feature #13362]</p>
</li></ul>
</li><li>
<p><a href="Random.html"><code>Random</code></a></p>
<ul><li>
<p>Random.raw_seed renamed to become <a href="Random.html#method-c-urandom"><code>Random.urandom</code></a>. It is now applicable to non-seeding purposes due to [Bug #9569].</p>
</li></ul>
</li><li>
<p><a href="Socket.html"><code>Socket</code></a></p>
<ul><li>
<p><a href="Socket/Ifaddr.html#method-i-vhid"><code>Socket::Ifaddr#vhid</code></a> is added [Feature #13803]</p>
</li></ul>
</li><li>
<p><a href="ConditionVariable.html"><code>ConditionVariable</code></a>, <a href="Queue.html"><code>Queue</code></a> and <a href="SizedQueue.html"><code>SizedQueue</code></a> reimplemented for speed. They no longer subclass <a href="Struct.html"><code>Struct</code></a>. [Feature #13552]</p>
</li></ul>
<h3 id="label-Stdlib+compatibility+issues+-28excluding+feature+bug+fixes-29">Stdlib compatibility issues (excluding feature bug fixes)<span><a href="#label-Stdlib+compatibility+issues+-28excluding+feature+bug+fixes-29">¶</a> <a href="#top">↑</a></span></h3>
<ul><li>
<p>Gemification</p>
<ul><li>
<p>Promote following standard libraries to default gems.</p>
<ul><li>
<p>cmath</p>
</li><li>
<p>csv</p>
</li><li>
<p>date</p>
</li><li>
<p>dbm</p>
</li><li>
<p>etc</p>
</li><li>
<p>fcntl</p>
</li><li>
<p>fiddle</p>
</li><li>
<p>fileutils</p>
</li><li>
<p>gdbm</p>
</li><li>
<p>ipaddr</p>
</li><li>
<p>scanf</p>
</li><li>
<p>sdbm</p>
</li><li>
<p>stringio</p>
</li><li>
<p>strscan</p>
</li><li>
<p>webrick</p>
</li><li>
<p>zlib</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="Logger.html"><code>Logger</code></a></p>
<ul><li>
<p><a href="Logger.html#method-c-new"><code>Logger.new</code></a>(“| command”) had been working to open a command unintentionally. It was prohibited, and now Logger#initialize treats a <a href="String.html"><code>String</code></a> argument only as a filename, as its specification. [Bug #14212]</p>
</li></ul>
</li><li>
<p><a href="Net/HTTP.html"><code>Net::HTTP</code></a></p>
<ul><li>
<p><a href="Net/HTTP.html#method-i-start"><code>Net::HTTP#start</code></a> now passes :ENV to p_addr by default. [Bug #13351] To avoid this, pass nil explicitly.</p>
</li></ul>
</li><li>
<p>mathn.rb</p>
<ul><li>
<p>Removed from stdlib. [Feature #10169]</p>
</li></ul>
</li><li>
<p>Rubygems</p>
<ul><li>
<p>Removed “ubygems.rb” file from stdlib. It's needless since Ruby 1.9.</p>
</li></ul>
</li></ul>
<h3 id="label-Supported+platform+changes">Supported platform changes<span><a href="#label-Supported+platform+changes">¶</a> <a href="#top">↑</a></span></h3>
<ul><li>
<p>Drop support of NaCl platform</p>
<ul><li>
<p><a href="https://bugs.chromium.org/p/chromium/issues/detail?id=239656#c160">bugs.chromium.org/p/chromium/issues/detail?id=239656#c160</a></p>
</li></ul>
</li></ul>
<h3 id="label-Implementation+improvements">Implementation improvements<span><a href="#label-Implementation+improvements">¶</a> <a href="#top">↑</a></span></h3>
<ul><li>
<p>(This might not be a “user visible feature change” but) <a href="Hash.html"><code>Hash</code></a> class's hash function is now SipHash13. [Feature #13017]</p>
</li><li>
<p><a href="SecureRandom.html"><code>SecureRandom</code></a> now prefers OS-provided sources than <a href="OpenSSL.html"><code>OpenSSL</code></a>. [Bug #9569]</p>
</li><li>
<p><a href="Mutex.html"><code>Mutex</code></a> rewritten to be smaller and faster [Feature #13517]</p>
</li><li>
<p>Performance of block passing using block parameters is improved by lazy <a href="Proc.html"><code>Proc</code></a> allocation [Feature #14045]</p>
</li><li>
<p>Dynamic instrumentation for <a href="TracePoint.html"><code>TracePoint</code></a> hooks instead of using “trace” instruction to avoid overhead [Feature #14104]</p>
</li><li>
<p><a href="ERB.html"><code>ERB</code></a> now generates code from a template twice as fast as Ruby 2.4</p>
</li></ul>
<h3 id="label-Miscellaneous+changes">Miscellaneous changes<span><a href="#label-Miscellaneous+changes">¶</a> <a href="#top">↑</a></span></h3>
<ul><li>
<p>Print backtrace and error message in reverse order if $stderr is unchanged and a tty. [Feature #8661] [experimental]</p>
</li><li>
<p>Print error message in bold/underlined text if $stderr is unchanged and a tty. [Feature #14140] [experimental]</p>
</li><li>
<p>configure option –with-ext now mandates its arguments. So for instance if you run ./configure –with-ext=openssl,+ then the openssl library is guaranteed compiled, otherwise the build fails abnormally.</p>
<p>Note however to always add the “,+” at the end of the argument. Otherwise nothing but openssl are built. [Feature #13302]</p>
</li></ul>
</main>
<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.1.
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
</footer>