3 This document is a list of user-visible feature changes
4 since the **3.3.0** release, except for bug fixes.
6 Note that each entry is kept to a minimum, see links for details.
10 * String literals in files without a `frozen_string_literal` comment now behave
11 as if they were frozen. If they are mutated a deprecation warning is emitted.
12 These warnings can be enabled with `-W:deprecated` or by setting `Warning[:deprecated] = true`.
13 To disable this change, you can run Ruby with the `--disable-frozen-string-literal`
14 command line argument. [[Feature #20205]]
16 * `it` is added to reference a block parameter. [[Feature #18980]]
18 * Keyword splatting `nil` when calling methods is now supported.
19 `**nil` is treated similarly to `**{}`, passing no keywords,
20 and not calling any conversion methods. [[Bug #20064]]
22 * Block passing is no longer allowed in index. [[Bug #19918]]
24 * Keyword arguments are no longer allowed in index. [[Bug #20218]]
26 ## Core classes updates
28 Note: We're only listing outstanding class updates.
32 * Exception#set_backtrace now accepts arrays of `Thread::Backtrace::Location`.
33 `Kernel#raise`, `Thread#raise` and `Fiber#raise` also accept this new format. [[Feature #13557]]
37 * Range#size now raises TypeError if the range is not iterable. [[Misc #18984]]
41 The following default gems are updated.
59 The following bundled gems are updated.
71 The following bundled gems are promoted from default gems.
79 * resolv-replace 0.1.1
86 See GitHub releases like [GitHub Releases of Logger](https://github.com/ruby/logger/releases) or changelog for details of the default gems or bundled gems.
88 ## Supported platforms
90 ## Compatibility issues
92 * Error messages and backtrace displays have been changed.
93 * Use a single quote instead of a backtick as a opening quote. [[Feature #16495]]
94 * Display a class name before a method name (only when the class has a permanent name). [[Feature #19117]]
95 * `Kernel#caller`, `Thread::Backtrace::Location`'s methods, etc. are also changed accordingly.
98 test.rb:1:in `foo': undefined method `time' for an instance of Integer
99 from test.rb:2:in `<main>'
102 test.rb:1:in 'Object#foo': undefined method 'time' for an instance of Integer
103 from test.rb:2:in `<main>'
106 ## Stdlib compatibility issues
110 * `rb_newobj` and `rb_newobj_of` (and corresponding macros `RB_NEWOBJ`, `RB_NEWOBJ_OF`, `NEWOBJ`, `NEWOBJ_OF`) have been removed. [[Feature #20265]]
111 * Removed deprecated function `rb_gc_force_recycle`. [[Feature #18290]]
113 ## Implementation improvements
115 * `Array#each` is rewritten in Ruby for better performance [[Feature #20182]].
119 ## Miscellaneous changes
121 * Passing a block to a method which doesn't use the passed block will show
122 a warning on verbose mode (`-w`).
125 * Redefining some core methods that are specially optimized by the interpeter
126 and JIT like `String.freeze` or `Integer#+` now emits a performance class
127 warning (`-W:performance` or `Warning[:performance] = true`).
130 [Feature #13557]: https://bugs.ruby-lang.org/issues/13557
131 [Feature #15554]: https://bugs.ruby-lang.org/issues/15554
132 [Feature #16495]: https://bugs.ruby-lang.org/issues/16495
133 [Feature #18290]: https://bugs.ruby-lang.org/issues/18290
134 [Feature #18980]: https://bugs.ruby-lang.org/issues/18980
135 [Misc #18984]: https://bugs.ruby-lang.org/issues/18984
136 [Feature #19117]: https://bugs.ruby-lang.org/issues/19117
137 [Bug #19918]: https://bugs.ruby-lang.org/issues/19918
138 [Bug #20064]: https://bugs.ruby-lang.org/issues/20064
139 [Feature #20182]: https://bugs.ruby-lang.org/issues/20182
140 [Feature #20205]: https://bugs.ruby-lang.org/issues/20205
141 [Bug #20218]: https://bugs.ruby-lang.org/issues/20218
142 [Feature #20265]: https://bugs.ruby-lang.org/issues/20265
143 [Feature #20429]: https://bugs.ruby-lang.org/issues/20429