Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f668985

Browse files
authoredDec 25, 2023
Ruby 3.3.0 Released (#3159)
1 parent ce6efe0 commit f668985

File tree

5 files changed

+612
-3
lines changed

5 files changed

+612
-3
lines changed
 

‎_data/branches.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
# eol_date: date of EOL (YYYY-MM-DD)
1010

1111
- name: 3.3
12-
status: preview
13-
date:
12+
status: normal maintenance
13+
date: 2023-12-25
1414
eol_date:
1515

1616
- name: 3.2

‎_data/downloads.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
# optional
55
preview:
66

7-
- 3.3.0-rc1
87

98
stable:
109

10+
- 3.3.0
1111
- 3.2.2
1212
- 3.1.4
1313

‎_data/releases.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,35 @@
2121

2222
# 3.3 series
2323

24+
- version: 3.3.0
25+
date: 2023-12-25
26+
post: /en/news/2023/12/25/ruby-3-3-0-released/
27+
tag: v3_3_0
28+
stats:
29+
files_changed: 5532
30+
insertions: 326851
31+
deletions: 185793
32+
url:
33+
gz: https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0.tar.gz
34+
zip: https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0.zip
35+
xz: https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0.tar.xz
36+
size:
37+
gz: 22065999
38+
zip: 26935108
39+
xz: 16345456
40+
sha1:
41+
gz: 1a7e56851bf29bda1183aca99b3b323c58e0187b
42+
zip: a433eef1d7f96daeaf3b4cb842d0ed2dd82e7dc1
43+
xz: c8f68e1b0a114b90460a0b44165a3b2f540fa5b6
44+
sha256:
45+
gz: 96518814d9832bece92a85415a819d4893b307db5921ae1f0f751a9a89a56b7d
46+
zip: 0e6563f679dd3694732eb3addf9de681c67b584602ac574376b60e7a509d2cd8
47+
xz: 676b65a36e637e90f982b57b059189b3276b9045034dcd186a7e9078847b975b
48+
sha512:
49+
gz: 26074009b501fc793d71a74e419f34a6033c9353433919ca74ba2d24a3de432dbb11fd92c2bc285f0e4d951a6d6c74bf5b69a2ab36200c8c26e871746d6e0fc6
50+
zip: a94a85937a14b217c1f4b90d24185289ed4aee79239c4f3eecf8034d3fd34e65ee8d66869473857ed153067188adc9b70c0471e4ebe842c9f98ef60c34090450
51+
xz: 7959c5753bfa0bfc4d6d74060869aabbe9815c1c97930659da11b917ee0803ddbbd80e869e00c48b8694b4ba48709c3b6493fd045568e36e902616c35ababf01
52+
2453
- version: 3.3.0-rc1
2554
date: 2023-12-11
2655
post: /en/news/2023/12/11/ruby-3-3-0-rc1-released/
Lines changed: 305 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,305 @@
1+
---
2+
layout: news_post
3+
title: "Ruby 3.3.0 Released"
4+
author: "naruse"
5+
translator:
6+
date: 2023-12-25 00:00:00 +0000
7+
lang: en
8+
---
9+
10+
{% assign release = site.data.releases | where: "version", "3.3.0" | first %}
11+
We are pleased to announce the release of Ruby {{ release.version }}. Ruby 3.3 adds a new parser named Prism, uses Lrama as a parser generator, adds a new pure-Ruby JIT compiler named RJIT, and many performance improvements especially YJIT.
12+
13+
## Prism
14+
15+
* Introduced [the Prism parser](https://github.com/ruby/prism) as a default gem
16+
* Prism is a portable, error tolerant, and maintainable recursive descent parser for the Ruby language
17+
* Prism is production ready and actively maintained, you can use it in place of Ripper
18+
* There is [extensive documentation](https://ruby.github.io/prism/) on how to use Prism
19+
* Prism is both a C library that will be used internally by CRuby and a Ruby gem that can be used by any tooling which needs to parse Ruby code
20+
* Notable methods in the Prism API are:
21+
* `Prism.parse(source)` which returns the AST as part of a parse result object
22+
* `Prism.parse_comments(source)` which returns the comments
23+
* `Prism.parse_success?(source)` which returns true if there are no errors
24+
* You can make pull requests or issues directly on [the Prism repository](https://github.com/ruby/prism) if you are interested in contributing
25+
* You can now use `ruby --parser=prism` or `RUBYOPT="--parser=prism"` to experiment with the Prism compiler. Please note that this flag is for debugging only.
26+
27+
## Use Lrama instead of Bison
28+
29+
* Replace Bison with [Lrama LALR parser generator](https://github.com/ruby/lrama) [[Feature #19637]](https://bugs.ruby-lang.org/issues/19637)
30+
* If you have interest, please see [The future vision of Ruby Parser](https://rubykaigi.org/2023/presentations/spikeolaf.html)
31+
* Lrama internal parser is replaced with LR parser generated by Racc for maintainability
32+
* Parameterizing Rules `(?, *, +)` are supported, it will be used in Ruby parse.y
33+
34+
## YJIT
35+
36+
* Major performance improvements over Ruby 3.2
37+
* Support for splat and rest arguments has been improved.
38+
* Registers are allocated for stack operations of the virtual machine.
39+
* More calls with optional arguments are compiled. Exception handlers are also compiled.
40+
* Unsupported call types and megamorphic call sites no longer exit to the interpreter.
41+
* Basic methods like Rails `#blank?` and
42+
[specialized `#present?`](https://github.com/rails/rails/pull/49909) are inlined.
43+
* `Integer#*`, `Integer#!=`, `String#!=`, `String#getbyte`,
44+
`Kernel#block_given?`, `Kernel#is_a?`, `Kernel#instance_of?`, and `Module#===`
45+
are specially optimized.
46+
* Compilation speed is now slightly faster than Ruby 3.2.
47+
* Now more than 3x faster than the interpreter on Optcarrot!
48+
* Significantly improved memory usage over Ruby 3.2
49+
* Metadata for compiled code uses a lot less memory.
50+
* `--yjit-call-threshold` is automatically raised from 30 to 120
51+
when the application has more than 40,000 ISEQs.
52+
* `--yjit-cold-threshold` is added to skip compiling cold ISEQs.
53+
* More compact code is generated on Arm64.
54+
* Code GC is now disabled by default
55+
* `--yjit-exec-mem-size` is treated as a hard limit where compilation of new code stops.
56+
* No sudden drops in performance due to code GC.
57+
Better copy-on-write behavior on servers reforking with
58+
[Pitchfork](https://github.com/shopify/pitchfork).
59+
* You can still enable code GC if desired with `--yjit-code-gc`
60+
* Add `RubyVM::YJIT.enable` that can enable YJIT at run-time
61+
* You can start YJIT without modifying command-line arguments or environment variables.
62+
Rails 7.2 will [enable YJIT by default](https://github.com/rails/rails/pull/49947)
63+
using this method.
64+
* This can also be used to enable YJIT only once your application is
65+
done booting. `--yjit-disable` can be used if you want to use other
66+
YJIT options while disabling YJIT at boot.
67+
* More YJIT stats are available by default
68+
* `yjit_alloc_size` and several more metadata-related stats are now available by default.
69+
* `ratio_in_yjit` stat produced by `--yjit-stats` is now available in release builds,
70+
a special stats or dev build is no longer required to access most stats.
71+
* Add more profiling capabilities
72+
* `--yjit-perf` is added to facilitate profiling with Linux perf.
73+
* `--yjit-trace-exits` now supports sampling with `--yjit-trace-exits-sample-rate=N`
74+
* More thorough testing and multiple bug fixes
75+
76+
## RJIT
77+
78+
* Introduced a pure-Ruby JIT compiler RJIT and replaced MJIT.
79+
* RJIT supports only x86-64 architecture on Unix platforms.
80+
* Unlike MJIT, it doesn't require a C compiler at runtime.
81+
* RJIT exists only for experimental purposes.
82+
* You should keep using YJIT in production.
83+
* If you are interested in developing JIT for Ruby, please check out [k0kubun's presentation on Day 3 of RubyKaigi](https://rubykaigi.org/2023/presentations/k0kubun.html#day3).
84+
85+
## M:N thread scheduler
86+
87+
* M:N thread scheduler was introduced. [[Feature #19842]](https://bugs.ruby-lang.org/issues/19842)
88+
* M Ruby threads are managed by N native threads (OS threads) so the thread creation and management cost are reduced.
89+
* It can break C-extension compatibility so that M:N thread scheduler is disabled on the main Ractor by default.
90+
* `RUBY_MN_THREADS=1` environment variable enables M:N threads on the main Ractor.
91+
* M:N threads are always enabled on non-main Ractors.
92+
* `RUBY_MAX_CPU=n` environment variable sets maximum number of `N` (maximum number of native threads). The default value is 8.
93+
* Since only one Ruby thread per Ractor can run at the same time, the number of native threads will be used, which is the smaller of the number specified in `RUBY_MAX_CPU` and the number of running Ractors. So that single Ractor applications (most of applications) will only use 1 native thread.
94+
* To support blocking operations, more than `N` native threads can be used.
95+
96+
## Performance improvements
97+
98+
* `defined?(@ivar)` is optimized with Object Shapes.
99+
* Name resolution such as `Socket.getaddrinfo` can now be interrupted (in environments where pthreads are available). [[Feature #19965]](https://bugs.ruby-lang.org/issues/19965)
100+
* Several performance improvements to the Garbage Collector
101+
* Young objects referenced by old objects are no longer immediately
102+
promoted to the old generation. This significantly reduces the frequency of
103+
major GC collections. [[Feature #19678]](https://bugs.ruby-lang.org/issues/19678)
104+
* A new `REMEMBERED_WB_UNPROTECTED_OBJECTS_LIMIT_RATIO` tuning variable was
105+
introduced to control the number of unprotected objects cause a major GC
106+
collection to trigger. The default is set to `0.01` (1%). This significantly
107+
reduces the frequency of major GC collection. [[Feature #19571]](https://bugs.ruby-lang.org/issues/19571)
108+
* Write Barriers were implemented for many core types that were missing them,
109+
notably `Time`, `Enumerator`, `MatchData`, `Method`, `File::Stat`, `BigDecimal`
110+
and several others. This significantly reduces minor GC collection time and major
111+
GC collection frequency.
112+
* Most core classes are now using Variable Width Allocation, notably `Hash`, `Time`,
113+
`Thread::Backtrace`, `Thread::Backtrace::Location`, `File::Stat`, `Method`.
114+
This makes these classes faster to allocate and free, use less memory and reduce
115+
heap fragmentation.
116+
* Support for weak references has been added to the garbage collector. [[Feature #19783]](https://bugs.ruby-lang.org/issues/19783)
117+
118+
119+
## Other notable changes since 3.2
120+
121+
### IRB
122+
123+
IRB has received several enhancements, including but not limited to:
124+
125+
- Advanced `irb:rdbg` integration that provides an equivalent debugging experience to `pry-byebug` ([doc](https://github.com/ruby/irb#debugging-with-irb)).
126+
- Pager support for `ls`, `show_source` and `show_cmds` commands.
127+
- More accurate and helpful information provided by the `ls` and `show_source` commands.
128+
- Experimental autocompletion using type analysis ([doc](https://github.com/ruby/irb#type-based-completion)).
129+
- It is now possible to change the font color and font style in the completion dialog by a newly introduced class Reline::Face ([doc](https://github.com/ruby/ruby/blob/master/doc/reline/face.md))
130+
131+
In addition, IRB has also undergone extensive refactoring and received dozens of bug fixes to facilitate easier future enhancements.
132+
133+
## Compatibility issues
134+
135+
Note: Excluding feature bug fixes.
136+
137+
* `it` calls without arguments in a block with no ordinary parameters are
138+
deprecated. `it` will be a reference to the first block parameter in Ruby 3.4.
139+
[[Feature #18980]](https://bugs.ruby-lang.org/issues/18980)
140+
141+
### Removed environment variables
142+
143+
The following deprecated methods are removed.
144+
145+
* Environment variable `RUBY_GC_HEAP_INIT_SLOTS` has been deprecated and is a no-op. Please use environment variables `RUBY_GC_HEAP_{0,1,2,3,4}_INIT_SLOTS` instead. [[Feature #19785]](https://bugs.ruby-lang.org/issues/19785)
146+
147+
## Stdlib compatibility issues
148+
149+
### `ext/readline` is retired
150+
151+
* We have `reline` that is pure Ruby implementation compatible with `ext/readline` API. We rely on `reline` in the future. If you need to use `ext/readline`, you can install `ext/readline` via rubygems.org with `gem install readline-ext`.
152+
* We no longer need to install libraries like `libreadline` or `libedit`.
153+
154+
## Standard library updates
155+
156+
RubyGems and Bundler warn if users do `require` the following gems without adding them to Gemfile or gemspec. This is because they will become the bundled gems in the future version of Ruby.
157+
158+
This warning is suppressed if you use bootsnap gem. We recoomend to run your application with `DISABLE_BOOTSNAP=1` environmental variable at least once. This is limitation of this version.
159+
160+
Targeted libraries are:
161+
* abbrev
162+
* base64
163+
* bigdecimal
164+
* csv
165+
* drb
166+
* getoptlong
167+
* mutex_m
168+
* nkf
169+
* observer
170+
* racc
171+
* resolv-replace
172+
* rinda
173+
* syslog
174+
175+
The following default gem is added.
176+
177+
* prism 0.19.0
178+
179+
The following default gems are updated.
180+
181+
* RubyGems 3.5.3
182+
* abbrev 0.1.2
183+
* base64 0.2.0
184+
* benchmark 0.3.0
185+
* bigdecimal 3.1.5
186+
* bundler 2.5.3
187+
* cgi 0.4.1
188+
* csv 3.2.8
189+
* date 3.3.4
190+
* delegate 0.3.1
191+
* drb 2.2.0
192+
* english 0.8.0
193+
* erb 4.0.3
194+
* error_highlight 0.6.0
195+
* etc 1.4.3
196+
* fcntl 1.1.0
197+
* fiddle 1.1.2
198+
* fileutils 1.7.2
199+
* find 0.2.0
200+
* getoptlong 0.2.1
201+
* io-console 0.7.1
202+
* io-nonblock 0.3.0
203+
* io-wait 0.3.1
204+
* ipaddr 1.2.6
205+
* irb 1.11.0
206+
* json 2.7.1
207+
* logger 1.6.0
208+
* mutex_m 0.2.0
209+
* net-http 0.4.0
210+
* net-protocol 0.2.2
211+
* nkf 0.1.3
212+
* observer 0.1.2
213+
* open-uri 0.4.1
214+
* open3 0.2.1
215+
* openssl 3.2.0
216+
* optparse 0.4.0
217+
* ostruct 0.6.0
218+
* pathname 0.3.0
219+
* pp 0.5.0
220+
* prettyprint 0.2.0
221+
* pstore 0.1.3
222+
* psych 5.1.2
223+
* rdoc 6.6.2
224+
* readline 0.0.4
225+
* reline 0.4.1
226+
* resolv 0.3.0
227+
* rinda 0.2.0
228+
* securerandom 0.3.1
229+
* set 1.1.0
230+
* shellwords 0.2.0
231+
* singleton 0.2.0
232+
* stringio 3.1.0
233+
* strscan 3.0.7
234+
* syntax_suggest 2.0.0
235+
* syslog 0.1.2
236+
* tempfile 0.2.1
237+
* time 0.3.0
238+
* timeout 0.4.1
239+
* tmpdir 0.2.0
240+
* tsort 0.2.0
241+
* un 0.3.0
242+
* uri 0.13.0
243+
* weakref 0.1.3
244+
* win32ole 1.8.10
245+
* yaml 0.3.0
246+
* zlib 3.1.0
247+
248+
The following bundled gem is promoted from default gems.
249+
250+
* racc 1.7.3
251+
252+
The following bundled gems are updated.
253+
254+
* minitest 5.20.0
255+
* rake 13.1.0
256+
* test-unit 3.6.1
257+
* rexml 3.2.6
258+
* rss 0.3.0
259+
* net-ftp 0.3.3
260+
* net-imap 0.4.9
261+
* net-smtp 0.4.0
262+
* rbs 3.4.0
263+
* typeprof 0.21.9
264+
* debug 1.9.1
265+
266+
See GitHub releases like [Logger](https://github.com/ruby/logger/releases) or
267+
changelog for details of the default gems or bundled gems.
268+
269+
See [NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md)
270+
or [commit logs](https://github.com/ruby/ruby/compare/v3_2_0...{{ release.tag }})
271+
for more details.
272+
273+
With those changes, [{{ release.stats.files_changed }} files changed, {{ release.stats.insertions }} insertions(+), {{ release.stats.deletions }} deletions(-)](https://github.com/ruby/ruby/compare/v3_2_0...{{ release.tag }}#file_bucket)
274+
since Ruby 3.2.0!
275+
276+
Merry Christmas, Happy Holidays, and enjoy programming with Ruby 3.3!
277+
278+
## Download
279+
280+
* <{{ release.url.gz }}>
281+
282+
SIZE: {{ release.size.gz }}
283+
SHA1: {{ release.sha1.gz }}
284+
SHA256: {{ release.sha256.gz }}
285+
SHA512: {{ release.sha512.gz }}
286+
287+
* <{{ release.url.xz }}>
288+
289+
SIZE: {{ release.size.xz }}
290+
SHA1: {{ release.sha1.xz }}
291+
SHA256: {{ release.sha256.xz }}
292+
SHA512: {{ release.sha512.xz }}
293+
294+
* <{{ release.url.zip }}>
295+
296+
SIZE: {{ release.size.zip }}
297+
SHA1: {{ release.sha1.zip }}
298+
SHA256: {{ release.sha256.zip }}
299+
SHA512: {{ release.sha512.zip }}
300+
301+
## What is Ruby
302+
303+
Ruby was first developed by Matz (Yukihiro Matsumoto) in 1993,
304+
and is now developed as Open Source. It runs on multiple platforms
305+
and is used all over the world especially for web development.
Lines changed: 275 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,275 @@
1+
---
2+
layout: news_post
3+
title: "Ruby 3.3.0 リリース"
4+
author: "naruse"
5+
translator:
6+
date: 2023-12-25 00:00:00 +0000
7+
lang: ja
8+
---
9+
10+
{% assign release = site.data.releases | where: "version", "3.3.0" | first %}
11+
Ruby {{ release.version }} が公開されました。Ruby 3.3ではPrismという新しいパーサーの追加、新しいパーサージェネレーターであるLramaによるBisonの置き換え、RJITという新たなJITの仕組みを追加、YJITの高速化など様々な改善が行われています。
12+
13+
## Prism
14+
15+
* default gemとして[Prismパーサ](https://github.com/ruby/prism)を導入しました。
16+
* Prismは、Ruby言語のためのポータブルで、エラートレラントで、保守可能な再帰下降パーサです。
17+
* Prismは本番環境で使用する準備が整っており、積極的にメンテナンスされています。Ripperの代わりに使用することができます。
18+
* Prismの使用方法については、[詳細なドキュメンテーション](https://ruby.github.io/prism/)があります。
19+
* Prismは、CRubyに内部的に使用されるCライブラリと、Rubyコードを解析する必要がある任意のツールに使用できるRuby gemの2つのコンポーネントを持っています。
20+
* Prism APIの注目すべきメソッドには以下のものがあります。
21+
* `Prism.parse(source)` は、パース結果オブジェクトの一部としてASTを返します。
22+
* `Prism.parse_comments(source)` はコメントを返します。
23+
* `Prism.parse_success?(source)` はエラーがない場合にtrueを返します。
24+
* Prism開発への貢献に興味がある場合は、[Prismリポジトリ](https://github.com/ruby/prism)に直接Pull RequestやIssueを作成することができます。
25+
* 今後は `ruby --parser=prism` または `RUBYOPT="--parser=prism"` を使用してPrismコンパイラを試すことができます。ただし、このフラグはデバッグ用であることに注意してください。
26+
27+
## Bisonの代わりにLramaを使用
28+
29+
* Bisonを[Lrama LALRパーサジェネレータ](https://github.com/ruby/lrama)に置き換えました。 [[Feature #19637]](https://bugs.ruby-lang.org/issues/19637)
30+
* 興味がある方は、[The future vision of Ruby Parser](https://rubykaigi.org/2023/presentations/spikeolaf.html)という発表をご覧ください。
31+
* 参考:[Ruby Parser開発日誌 (5) - Lrama LALR (1) parser generatorを実装した](https://yui-knk.hatenablog.com/entry/2023/03/13/101951)
32+
* Lramaの内部パーサは、保守性のためにRaccによって生成されたLRパーサに置き換えられました。
33+
* パラメータ化ルール `(?, *, +)` がサポートされ、CRubyのparse.yで使用されます。
34+
35+
## YJIT
36+
37+
* 大幅なパフォーマンスの改善
38+
* `*` を使った引数のサポートが改善されました。
39+
* 仮想マシンのスタック操作のためにレジスタが使われるようになりました。
40+
* オプション引数を持つ呼び出しで全ての組合せがコンパイルされます。例外ハンドラもコンパイルされます。
41+
* サポートされていない呼び出し方や分岐の数の多い呼出しでのインタプリタへのフォールバックが行なわれなくなりました。
42+
* Railsの `#blank?`[特別化された `#present?`](https://github.com/rails/rails/pull/49909) などの単純なメソッドがインライン化されます。
43+
* `Integer#*``Integer#!=``String#!=``String#getbyte``Kernel#block_given?``Kernel#is_a?``Kernel#instance_of?`、および `Module#===` が特別に最適化されます。
44+
* コンパイル速度はRuby 3.2よりわずかに速くなりました。
45+
* Optcarrotでは、インタプリタよりも3倍以上速くなりました!
46+
* メモリ使用量の大幅な改善
47+
* コンパイルされたコードのメタデータは、はるかに少ないメモリを使用します。
48+
* アプリケーションが4万個以上のISEQを持つ場合、`--yjit-call-threshold` は自動的に30から120に上げられます。
49+
* 呼出しの少ないISEQのコンパイルをスキップするために `--yjit-cold-threshold` が追加されました。
50+
* Arm64ではよりコンパクトなコードが生成されます。
51+
* コードGCはデフォルトで無効になりました
52+
* `--yjit-exec-mem-size` は新しいコードのコンパイルが停止するハードリミットとして扱われます。
53+
* これにより、デフォルトではコードGC実行によるパフォーマンスの急激な低下がなくなりました。[Pitchfork](https://github.com/shopify/pitchfork) を使って定期的にforkするサーバーでのコピーオンライトの挙動が改善されました。
54+
* 必要に応じて `--yjit-code-gc` でコードGCを有効にすることもできます。
55+
* `RubyVM::YJIT.enable` を追加し、実行時にYJITを有効にできるようにしました
56+
* コマンドライン引数や環境変数を変更せずにYJITを開始できます。Rails 7.2はこの方法を使用して [デフォルトでYJITを有効にします](https://github.com/rails/rails/pull/49947)
57+
* これはまた、アプリケーションの起動が完了した後にのみYJITを有効にするために使用できます。YJITの他のオプションを使用しながら起動時にYJITを無効にしたい場合は、`--yjit-disable` を使用できます。
58+
* デフォルトで利用可能なYJITの統計が増えました
59+
* `yjit_alloc_size` およびその他いくつかのメタデータ関連の統計がデフォルトで利用可能になりました。
60+
* `--yjit-stats` によって生成される `ratio_in_yjit` 統計は、リリースビルドで利用可能になりました。特別な統計や開発ビルドは、ほとんどの統計にアクセスするためにはもはや必要ありません。
61+
* プロファイリング機能を追加
62+
* Linux perfでのプロファイリングを容易にするために `--yjit-perf` が追加されました。
63+
* `--yjit-trace-exits` は、`--yjit-trace-exits-sample-rate=N` を使用したサンプリングをサポートします。
64+
* より網羅的なテストと複数のバグ修正
65+
66+
## RJIT
67+
68+
* Rubyで書かれたJITコンパイラであるRJITを導入し、MJITを置き換えました。
69+
* RJITはUnixプラットフォーム上のx86\_64アーキテクチャのみをサポートします。
70+
* MJITとは異なり、実行時にCコンパイラを必要としません。
71+
* RJITは実験的な目的のためだけに存在します。
72+
* 本番環境ではYJITを引き続き使用してください。
73+
* RubyのJITの開発に興味がある場合は、[RubyKaigiの3日目のk0kubunの発表](https://rubykaigi.org/2023/presentations/k0kubun.html#day3)をご覧ください。
74+
75+
## M:N スレッドスケジューラ
76+
77+
* M:N スレッドスケジューラが導入されました。[[Feature #19842]](https://bugs.ruby-lang.org/issues/19842)
78+
* M個のRuby スレッドを、N個のネイティブスレッド(OSスレッド)で管理するので、生成管理のコストを抑えることができるようになりました。
79+
* C拡張ライブラリの互換性に問題が生じる可能性があるため、メインRactorでのM:Nスレッドスケジューラはデフォルトでは無効にされています。
80+
* `RUBY_MN_THREADS=1` と環境変数を設定することで、メインRactorでM:Nスレッドスケジューラを有効にします。
81+
* メインRactor以外ではM:Nスレッドスケジューラが常に有効です。
82+
* `RUBY_MAX_CPU=n` と環境変数を設定することで、Nの最大数(利用するネイティブスレッドの最大数)を設定できます。デフォルトは8です。
83+
* 一つの Ractor ではたかだか1つのスレッドしか同時に実行されないので、実際に利用するネイティブスレッド数は、`RUBY_MAX_CPU`で指定した数か実行中のRactorの数の少ないほうになります。つまり、Ractorの数が1つのアプリケーション(多くのアプリケーション)では1つのネイティブスレッドだけ利用されます。
84+
* ブロックする処理をサポートするため、N個以上のネイティブスレッドが利用されることがあります。
85+
86+
## パフォーマンスの改善
87+
88+
* `defined?(@ivar)` is optimized with Object Shapes.
89+
* `Socket.getaddrinfo` などの名前解決を中断できるようになりました (pthread が利用できる環境のみ)。[[Feature 19965]](https://bugs.ruby-lang.org/issues/19965)
90+
* 環境変数 `RUBY_GC_HEAP_REMEMBERED_WB_UNPROTECTED_OBJECTS_LIMIT_RATIO` が追加されました。[[Feature #19571]](https://bugs.ruby-lang.org/issues/19571)
91+
* GCで古いオブジェクトの子オブジェクトがすぐにプロモートされなくなりました。[[Feature #19678]](https://bugs.ruby-lang.org/issues/19678)
92+
* GCに弱参照が追加されました。[[Feature #19783]](https://bugs.ruby-lang.org/issues/19783)
93+
94+
## その他の注目すべき 3.2 からの変更点
95+
96+
### IRB
97+
98+
IRBは様々な機能強化を行いました。主なものは以下の通りです。
99+
100+
* IRBとrdbgの連携 pry-byebugのような使い心地でデバッグできるようになりました。([使い方](https://github.com/ruby/irb#debugging-with-irb))
101+
* lsコマンドやshow_cmdsの出力がPagerで表示されるようになりました。
102+
* lsコマンドやshow_sourceコマンドがより便利で詳細な情報を出力するようになりました。
103+
* 型情報を使った補完が実験的に実装されました。([有効化するには](https://github.com/ruby/irb#type-based-completion))
104+
* Reline::Faceクラスの導入により、補完ダイアログの色や文字装飾を変更できるようになりました。([使い方](https://github.com/ruby/ruby/blob/master/doc/reline/face.md)
105+
106+
また、機能強化以外にも、数多くのバグ修正および将来的な機能拡張を見越した大規模なリファクタリングを行ないました。
107+
108+
109+
## 互換性に関する変更
110+
111+
* ブロック内での引数なし `it` の呼び出しは非推奨になりました。
112+
Ruby 3.4から最初のブロック引数を参照するようになります。
113+
[[Feature #18980]](https://bugs.ruby-lang.org/issues/18980)
114+
115+
### 環境変数の削除
116+
117+
以下の非推奨の環境変数は削除されました
118+
119+
* 環境変数 `RUBY_GC_HEAP_INIT_SLOTS` は非推奨になり、何もしなくなりました。環境変数 `RUBY_GC_HEAP_{0,1,2,3,4}_INIT_SLOTS` を使ってください。[[Feature #19785]](https://bugs.ruby-lang.org/issues/19785)
120+
121+
## 標準添付ライブラリの互換性に関する変更
122+
123+
### `ext/readline` の削除
124+
125+
* 今後は Ruby で書かれた GNU Readline の互換ライブラリである `reline` をすべての環境で標準で利用し、`ext/readline` は削除されました。以前の `ext/readline` が必要なユーザーは `gem install readline-ext` でインストールすることができます。
126+
* この変更により、Ruby のインストール時に `libreadline``libedit` などのライブラリのインストールは不要となります。
127+
128+
## 標準添付ライブラリのアップデート
129+
130+
RubyGems と Bundler は将来リリースされる Ruby で bundled gems となる予定の gem が Gemfile または gemspec に存在しない状態で require された際に警告を行う機能が追加されました。
131+
132+
この警告は bootsnap gem を使っている場合には 3.3.0 の時点では機能上の制限により出力されません。そのため、環境変数として `DISABLE_BOOTSNAP=1` などを設定して、少なくとも1度はアプリケーションを実行することを推奨します。
133+
134+
以下のライブラリが警告の対象となります。
135+
* abbrev
136+
* base64
137+
* bigdecimal
138+
* csv
139+
* drb
140+
* getoptlong
141+
* mutex_m
142+
* nkf
143+
* observer
144+
* racc
145+
* resolv-replace
146+
* rinda
147+
* syslog
148+
149+
150+
以下の default gem が追加されました。
151+
152+
* prism 0.19.0
153+
154+
以下の default gems のバージョンがアップデートされました。
155+
156+
* RubyGems 3.5.3
157+
* abbrev 0.1.2
158+
* base64 0.2.0
159+
* benchmark 0.3.0
160+
* bigdecimal 3.1.5
161+
* bundler 2.5.3
162+
* cgi 0.4.1
163+
* csv 3.2.8
164+
* date 3.3.4
165+
* delegate 0.3.1
166+
* drb 2.2.0
167+
* english 0.8.0
168+
* erb 4.0.3
169+
* error_highlight 0.6.0
170+
* etc 1.4.3
171+
* fcntl 1.1.0
172+
* fiddle 1.1.2
173+
* fileutils 1.7.2
174+
* find 0.2.0
175+
* getoptlong 0.2.1
176+
* io-console 0.7.1
177+
* io-nonblock 0.3.0
178+
* io-wait 0.3.1
179+
* ipaddr 1.2.6
180+
* irb 1.11.0
181+
* json 2.7.1
182+
* logger 1.6.0
183+
* mutex_m 0.2.0
184+
* net-http 0.4.0
185+
* net-protocol 0.2.2
186+
* nkf 0.1.3
187+
* observer 0.1.2
188+
* open-uri 0.4.1
189+
* open3 0.2.1
190+
* openssl 3.2.0
191+
* optparse 0.4.0
192+
* ostruct 0.6.0
193+
* pathname 0.3.0
194+
* pp 0.5.0
195+
* prettyprint 0.2.0
196+
* pstore 0.1.3
197+
* psych 5.1.2
198+
* rdoc 6.6.2
199+
* readline 0.0.4
200+
* reline 0.4.1
201+
* resolv 0.3.0
202+
* rinda 0.2.0
203+
* securerandom 0.3.1
204+
* set 1.1.0
205+
* shellwords 0.2.0
206+
* singleton 0.2.0
207+
* stringio 3.1.0
208+
* strscan 3.0.7
209+
* syntax_suggest 2.0.0
210+
* syslog 0.1.2
211+
* tempfile 0.2.1
212+
* time 0.3.0
213+
* timeout 0.4.1
214+
* tmpdir 0.2.0
215+
* tsort 0.2.0
216+
* un 0.3.0
217+
* uri 0.13.0
218+
* weakref 0.1.3
219+
* win32ole 1.8.10
220+
* yaml 0.3.0
221+
* zlib 3.1.0
222+
223+
新たに以下の gem が default gems から bundled gems に変更されました。
224+
225+
* racc 1.7.3
226+
227+
以下の bundled gems のバージョンがアップデートされました。
228+
229+
* minitest 5.20.0
230+
* rake 13.1.0
231+
* test-unit 3.6.1
232+
* rexml 3.2.6
233+
* rss 0.3.0
234+
* net-ftp 0.3.3
235+
* net-imap 0.4.9
236+
* net-smtp 0.4.0
237+
* rbs 3.4.0
238+
* typeprof 0.21.9
239+
* debug 1.9.1
240+
241+
default gems と bundled gems の詳細については [Logger の GitHub Releases](https://github.com/ruby/logger/releases) のような GitHub releases または changelog ファイルを参照してください。
242+
243+
244+
その他詳細については、[NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md) ファイルまたは[コミットログ](https://github.com/ruby/ruby/compare/v3_2_0...{{ release.tag }})を参照してください。
245+
246+
なお、こうした変更により、Ruby 3.2.0 以降では [{{ release.stats.files_changed }} 個のファイルに変更が加えられ、{{ release.stats.insertions }} 行の追加と {{ release.stats.deletions }} 行の削除が行われました](https://github.com/ruby/ruby/compare/v3_2_0...{{ release.tag }}#file_bucket) !
247+
248+
メリークリスマス、Ruby 3.3 とともによいお年をお迎えください!
249+
250+
## ダウンロード
251+
252+
* <{{ release.url.gz }}>
253+
254+
SIZE: {{ release.size.gz }}
255+
SHA1: {{ release.sha1.gz }}
256+
SHA256: {{ release.sha256.gz }}
257+
SHA512: {{ release.sha512.gz }}
258+
259+
* <{{ release.url.xz }}>
260+
261+
SIZE: {{ release.size.xz }}
262+
SHA1: {{ release.sha1.xz }}
263+
SHA256: {{ release.sha256.xz }}
264+
SHA512: {{ release.sha512.xz }}
265+
266+
* <{{ release.url.zip }}>
267+
268+
SIZE: {{ release.size.zip }}
269+
SHA1: {{ release.sha1.zip }}
270+
SHA256: {{ release.sha256.zip }}
271+
SHA512: {{ release.sha512.zip }}
272+
273+
## Ruby とは
274+
275+
Rubyはまつもとゆきひろ (Matz) によって1993年に開発が始められ、今もオープンソースソフトウェアとして開発が続けられています。Rubyは様々なプラットフォームで動き、世界中で、特にWebアプリケーション開発のために使われています。

0 commit comments

Comments
 (0)
Please sign in to comment.