YJIT: implement cache for recently encoded/decoded contexts (#10938)
[ruby.git] / NEWS.md
blobac77cfae9d0cceb72f86a191c64bf1cc9853ed3c
1 # NEWS for Ruby 3.4.0
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.
8 ## Language changes
10 * String literals in files without a `frozen_string_literal` comment now emit a deprecation warning
11   when they are mutated.
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 assignment
23   (e.g. `a[0, &b] = 1`).  [[Bug #19918]]
25 * Keyword arguments are no longer allowed in index assignment
26   (e.g. `a[0, kw: 1] = 2`).  [[Bug #20218]]
28 ## Core classes updates
30 Note: We're only listing outstanding class updates.
32 * Exception
34   * Exception#set_backtrace now accepts arrays of `Thread::Backtrace::Location`.
35     `Kernel#raise`, `Thread#raise` and `Fiber#raise` also accept this new format. [[Feature #13557]]
37 * Range
39   * Range#size now raises TypeError if the range is not iterable. [[Misc #18984]]
41 ## Stdlib updates
43 * Tempfile
45     * The keyword argument `anonymous: true` is implemented for `Tempfile.create`.
46       `Tempfile.create(anonymous: true)` removes the created temporary file immediately.
47       So applications don't need to remove the file.
48       [[Feature #20497]]
50 The following default gems are updated.
52 * RubyGems 3.6.0.dev
53 * bundler 2.6.0.dev
54 * erb 4.0.4
55 * fiddle 1.1.3
56 * io-console 0.7.2
57 * irb 1.13.1
58 * json 2.7.2
59 * net-http 0.4.1
60 * optparse 0.5.0
61 * prism 0.30.0
62 * rdoc 6.7.0
63 * reline 0.5.8
64 * resolv 0.4.0
65 * stringio 3.1.1
66 * strscan 3.1.1
68 The following bundled gems are updated.
70 * minitest 5.23.1
71 * rake 13.2.1
72 * test-unit 3.6.2
73 * rexml 3.2.8
74 * net-ftp 0.3.5
75 * net-imap 0.4.12
76 * net-smtp 0.5.0
77 * rbs 3.4.4
78 * typeprof 0.21.11
79 * debug 1.9.2
80 * racc 1.8.0
82 The following bundled gems are promoted from default gems.
84 * mutex_m 0.2.0
85 * getoptlong 0.2.1
86 * base64 0.2.0
87 * bigdecimal 3.1.8
88 * observer 0.1.2
89 * abbrev 0.1.2
90 * resolv-replace 0.1.1
91 * rinda 0.2.0
92 * drb 2.2.1
93 * nkf 0.2.0
94 * syslog 0.1.2
95 * csv 3.3.0
97 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.
99 ## Supported platforms
101 ## Compatibility issues
103 * Error messages and backtrace displays have been changed.
104   * Use a single quote instead of a backtick as a opening quote. [[Feature #16495]]
105   * Display a class name before a method name (only when the class has a permanent name). [[Feature #19117]]
106   * `Kernel#caller`, `Thread::Backtrace::Location`'s methods, etc. are also changed accordingly.
107   ```
108   Old:
109   test.rb:1:in `foo': undefined method `time' for an instance of Integer
110           from test.rb:2:in `<main>'
112   New:
113   test.rb:1:in 'Object#foo': undefined method 'time' for an instance of Integer
114           from test.rb:2:in `<main>'
115   ```
117 ## Stdlib compatibility issues
119 ## C API updates
121 * `rb_newobj` and `rb_newobj_of` (and corresponding macros `RB_NEWOBJ`, `RB_NEWOBJ_OF`, `NEWOBJ`, `NEWOBJ_OF`) have been removed. [[Feature #20265]]
122 * Removed deprecated function `rb_gc_force_recycle`. [[Feature #18290]]
124 ## Implementation improvements
126 * `Array#each` is rewritten in Ruby for better performance [[Feature #20182]].
128 ## JIT
130 ## Miscellaneous changes
132 * Passing a block to a method which doesn't use the passed block will show
133   a warning on verbose mode (`-w`).
134   [[Feature #15554]]
136 * Redefining some core methods that are specially optimized by the interpreter
137   and JIT like `String.freeze` or `Integer#+` now emits a performance class
138   warning (`-W:performance` or `Warning[:performance] = true`).
139   [[Feature #20429]]
141 [Feature #13557]: https://bugs.ruby-lang.org/issues/13557
142 [Feature #15554]: https://bugs.ruby-lang.org/issues/15554
143 [Feature #16495]: https://bugs.ruby-lang.org/issues/16495
144 [Feature #18290]: https://bugs.ruby-lang.org/issues/18290
145 [Feature #18980]: https://bugs.ruby-lang.org/issues/18980
146 [Misc #18984]:    https://bugs.ruby-lang.org/issues/18984
147 [Feature #19117]: https://bugs.ruby-lang.org/issues/19117
148 [Bug #19918]:     https://bugs.ruby-lang.org/issues/19918
149 [Bug #20064]:     https://bugs.ruby-lang.org/issues/20064
150 [Feature #20182]: https://bugs.ruby-lang.org/issues/20182
151 [Feature #20205]: https://bugs.ruby-lang.org/issues/20205
152 [Bug #20218]:     https://bugs.ruby-lang.org/issues/20218
153 [Feature #20265]: https://bugs.ruby-lang.org/issues/20265
154 [Feature #20429]: https://bugs.ruby-lang.org/issues/20429