Skip to content

Commit 3a5646d

Browse files
authored
Ruby 3.3.0-preview3 Released (#3136)
1 parent 1fa2dfe commit 3a5646d

File tree

4 files changed

+607
-1
lines changed

4 files changed

+607
-1
lines changed

_data/downloads.yml

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

7-
- 3.3.0-preview2
7+
- 3.3.0-preview3
88

99
stable:
1010

_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-preview3
25+
date: 2023-11-12
26+
post: /en/news/2023/11/12/ruby-3-3-0-preview3-released/
27+
tag: v3_3_0_preview3
28+
stats:
29+
files_changed: 5207
30+
insertions: 284820
31+
deletions: 174773
32+
url:
33+
gz: https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-preview3.tar.gz
34+
zip: https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-preview3.zip
35+
xz: https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-preview3.tar.xz
36+
size:
37+
gz: 21550473
38+
zip: 26618303
39+
xz: 15970144
40+
sha1:
41+
gz: 2811f191d66dffee0206771873bd990857ae4ed6
42+
zip: 6a13e08c7e484d42037c1e2c87c5d0e220f893a0
43+
xz: 496600612605f8ebeb955255e98bac73a4cbc045
44+
sha256:
45+
gz: 0969141be92e67e0edb84a8fb354acc98f01bd78e602a23a0f136045c82f4809
46+
zip: c35bf637a647c2f60148368ffb374db5c258570911794f46b6dfdb98ebfe95d9
47+
xz: f79afcf122dc7d04fe26cfa4436b9c488b21766fc54b0d2dfb2ba41cd0cdd355
48+
sha512:
49+
gz: 94db07a6958c09809b2e5b597fa55a121074e8bacb3bf588c83cf0d35b07a8b070172035a49d1abf0d8ee364a9ace824f34e677f7327ffe1acdbab0938ac49c4
50+
zip: c4ef2cdcdadeb85ad1d42aedc97f9f3d609b3b01eea2319451cf92c81bd31ae8129b7c91fc68571469dd888c01ea0f48f73234b965db17f6a87404ca382f7794
51+
xz: d7ab0d703e7884efd31045933409cd68fac1d9941963537ccc8e309ca7c8bee8500a68182135acba22cbdbf4a8ae99f39bf7f0925273eb4fbc3728c0c1ba0c19
52+
2453
- version: 3.3.0-preview2
2554
date: 2023-09-14
2655
post: /en/news/2023/09/14/ruby-3-3-0-preview2-released/
Lines changed: 294 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,294 @@
1+
---
2+
layout: news_post
3+
title: "Ruby 3.3.0-preview3 Released"
4+
author: "naruse"
5+
translator:
6+
date: 2023-11-12 00:00:00 +0000
7+
lang: en
8+
---
9+
10+
{% assign release = site.data.releases | where: "version", "3.3.0-preview3" | first %}
11+
12+
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.
13+
14+
## Prism
15+
16+
* Introduced [the Prism parser](https://github.com/ruby/prism) as a default gem
17+
* Prism is a portable, error tolerant, and maintainable recursive descent parser for the Ruby language
18+
* Prism is production ready and actively maintained, you can use it in place of Ripper
19+
* There is [extensive documentation](https://ruby.github.io/prism/) on how to use Prism
20+
* 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
21+
* Notable methods in the Prism API are:
22+
* `Prism.parse(source)` which returns the AST as part of a ParseResult
23+
* `Prism.dump(source, filepath)` which returns the serialized AST as a String
24+
* `Prism.parse_comments(source)` which returns the comments
25+
* You can make pull requests or issues directly on [the Prism repository](https://github.com/ruby/prism) if you are interested in contributing
26+
27+
## Use Lrama instead of Bison
28+
29+
* Replace Bison with [Lrama LALR parser generator](https://github.com/yui-knk/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+
## RJIT
35+
36+
* Introduced a pure-Ruby JIT compiler RJIT and replaced MJIT.
37+
* RJIT supports only x86-64 architecture on Unix platforms.
38+
* Unlike MJIT, it doesn't require a C compiler at runtime.
39+
* RJIT exists only for experimental purposes.
40+
* You should keep using YJIT in production.
41+
* 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).
42+
43+
## YJIT
44+
45+
* Major performance improvements over 3.2
46+
* Support for splat and rest arguments has been improved.
47+
* Registers are allocated for stack operations of the virtual machine.
48+
* More calls with optional arguments are compiled.
49+
* Exception handlers are also compiled.
50+
* Instance variables no longer exit to the interpreter
51+
with megamorphic object shapes.
52+
* Unsupported call types no longer exit to the interpreter.
53+
* `Integer#!=`, `String#!=`, `Kernel#block_given?`, `Kernel#is_a?`,
54+
`Kernel#instance_of?`, `Module#===` are specially optimized.
55+
* Now more than 3x faster than the interpreter on optcarrot!
56+
* Significantly improved memory usage over 3.2
57+
* Metadata for compiled code uses a lot less memory.
58+
* Generate more compact code on ARM64
59+
* Compilation speed is now slightly faster than 3.2.
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+
* This can also be used to enable YJIT only once your application is
63+
done booting. `--yjit-disable` can be used if you want to use other
64+
YJIT options while disabling YJIT at boot.
65+
* Option to disable code GC and treat `--yjit-exec-mem-size` as a hard limit
66+
* Can produce better copy-on-write behavior on servers using unicorn and forking
67+
* `ratio_in_yjit` stat produced by `--yjit-stats` is now avaiable in release builds,
68+
a special stats or dev build is no longer required to access most stats.
69+
* Exit tracing option now supports sampling
70+
* `--trace-exits-sample-rate=N`
71+
* `--yjit-perf` is added to facilitate profiling with Linux perf.
72+
* More thorough testing and multiple bug fixes
73+
74+
### M:N thread scheduler
75+
76+
* M:N thread scheduler was introduced. [[Feature #19842]](https://bugs.ruby-lang.org/issues/19842)
77+
* M Ruby threads are managed by N native threads (OS threads) so the thread creation and management cost are reduced.
78+
* It can break C-extension compatibility so that M:N thread scheduler is disabled on the main Ractor by default.
79+
* `RUBY_MN_THREADS=1` environment variable enables M:N threads on the main Ractor.
80+
* M:N threads are enabled on non-main Ractors.
81+
* `RUBY_MAX_CPU=n` environment variable sets maximum number of `N` (maximum number of native threads). The default value is 8.
82+
* 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 use 1 native thread.
83+
* To support blocking operations, more than `N` native threads can be used.
84+
85+
## Other Notable New Features
86+
87+
88+
89+
### Language
90+
91+
92+
93+
## Performance improvements
94+
95+
* `defined?(@ivar)` is optimized with Object Shapes.
96+
* 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)
97+
* For this purpose, a pthread is now created whenever calling getaddrinfo or getnameinfo. This incurs some overhead in name resolution (about 2.5x in our experiments). We do not expect the name resolution overhead to be a problem for most applications, but if you observe such, or if you see unexpected affects that you believe are due to this change, please report them.
98+
* Environment variable `RUBY_GC_HEAP_REMEMBERED_WB_UNPROTECTED_OBJECTS_LIMIT_RATIO` has been added. [Feature #19571](https://bugs.ruby-lang.org/issues/19571)
99+
* Children of old objects are no longer immedately promoted to the old generation in the garbage collector. [Feature #19678](https://bugs.ruby-lang.org/issues/19678)
100+
* Support for weak references has been added to the garbage collector. [Feature #19783](https://bugs.ruby-lang.org/issues/19783)
101+
102+
## Other notable changes since 3.2
103+
104+
### IRB
105+
106+
IRB has received several enhancements, including but not limited to:
107+
108+
- Advanced `irb:rdbg` integration that provides an equivalent debugging experience to `pry-byebug` ([doc](https://github.com/ruby/irb#debugging-with-irb)).
109+
- Pager support for `ls`, `show_source` and `show_cmds` commands.
110+
- More accurate and helpful information provided by the `ls` and `show_source` commands.
111+
- Experimental autocompletion using type analysis ([doc](https://github.com/ruby/irb#type-based-completion)).
112+
- 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))
113+
114+
In addition, IRB has also undergone extensive refactoring and received dozens of bug fixes to facilitate easier future enhancements.
115+
116+
## Compatibility issues
117+
118+
Note: Excluding feature bug fixes.
119+
120+
### Removed constants
121+
122+
The following deprecated constants are removed.
123+
124+
125+
126+
### Removed methods
127+
128+
The following deprecated methods are removed.
129+
130+
### Removed environment variables
131+
132+
The following deprecated methods are removed.
133+
134+
* 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)
135+
136+
## Stdlib compatibility issues
137+
138+
### `ext/readline` is retired
139+
140+
* 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`.
141+
* We no longer need to install libraries like `libreadline` or `libedit`.
142+
143+
## C API updates
144+
145+
### Updated C APIs
146+
147+
The following APIs are updated.
148+
149+
150+
151+
### Removed C APIs
152+
153+
The following deprecated APIs are removed.
154+
155+
156+
157+
## Standard library updates
158+
159+
RubyGems and Bundler warn if users require gem that is scheduled to become the bundled gems in the future version of Ruby.
160+
161+
Targeted libraries are:
162+
* abbrev
163+
* base64
164+
* bigdecimal
165+
* csv
166+
* drb
167+
* getoptlong
168+
* mutex_m
169+
* nkf
170+
* observer
171+
* racc
172+
* resolv-replace
173+
* rinda
174+
* syslog
175+
176+
The following default gem is added.
177+
178+
* prism 0.15.1
179+
180+
The following default gems are updated.
181+
182+
* RubyGems 3.5.0.dev
183+
* base64 0.2.0
184+
* benchmark 0.3.0
185+
* bigdecimal 3.1.5
186+
* bundler 2.5.0.dev
187+
* cgi 0.4.0
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+
* etc 1.4.3.dev.1
195+
* fcntl 1.1.0
196+
* fiddle 1.1.2
197+
* fileutils 1.7.2
198+
* find 0.2.0
199+
* getoptlong 0.2.1
200+
* io-console 0.6.1.dev
201+
* irb 1.8.3
202+
* logger 1.6.0
203+
* mutex_m 0.2.0
204+
* net-http 0.4.0
205+
* net-protocol 0.2.2
206+
* nkf 0.1.3
207+
* observer 0.1.2
208+
* open-uri 0.4.0
209+
* open3 0.2.0
210+
* openssl 3.2.0
211+
* optparse 0.4.0
212+
* ostruct 0.6.0
213+
* pathname 0.3.0
214+
* pp 0.5.0
215+
* prettyprint 0.2.0
216+
* pstore 0.1.3
217+
* psych 5.1.1.1
218+
* rdoc 6.6.0
219+
* reline 0.3.9
220+
* rinda 0.2.0
221+
* securerandom 0.3.0
222+
* shellwords 0.2.0
223+
* singleton 0.2.0
224+
* stringio 3.0.9
225+
* strscan 3.0.7
226+
* syntax_suggest 1.1.0
227+
* tempfile 0.2.0
228+
* time 0.3.0
229+
* timeout 0.4.1
230+
* tmpdir 0.2.0
231+
* tsort 0.2.0
232+
* un 0.3.0
233+
* uri 0.13.0
234+
* weakref 0.1.3
235+
* win32ole 1.8.10
236+
* yaml 0.3.0
237+
* zlib 3.1.0
238+
239+
The following bundled gem is promoted from default gems.
240+
241+
* racc 1.7.3
242+
243+
The following bundled gems are updated.
244+
245+
* minitest 5.20.0
246+
* rake 13.1.0
247+
* test-unit 3.6.1
248+
* rexml 3.2.6
249+
* rss 0.3.0
250+
* net-imap 0.4.4
251+
* net-smtp 0.4.0
252+
* rbs 3.2.2
253+
* typeprof 0.21.8
254+
* debug 1.8.0
255+
256+
See GitHub releases like [Logger](https://github.com/ruby/logger/releases) or
257+
changelog for details of the default gems or bundled gems.
258+
259+
See [NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md)
260+
or [commit logs](https://github.com/ruby/ruby/compare/v3_2_0...{{ release.tag }})
261+
for more details.
262+
263+
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)
264+
since Ruby 3.2.0!
265+
266+
267+
## Download
268+
269+
* <{{ release.url.gz }}>
270+
271+
SIZE: {{ release.size.gz }}
272+
SHA1: {{ release.sha1.gz }}
273+
SHA256: {{ release.sha256.gz }}
274+
SHA512: {{ release.sha512.gz }}
275+
276+
* <{{ release.url.xz }}>
277+
278+
SIZE: {{ release.size.xz }}
279+
SHA1: {{ release.sha1.xz }}
280+
SHA256: {{ release.sha256.xz }}
281+
SHA512: {{ release.sha512.xz }}
282+
283+
* <{{ release.url.zip }}>
284+
285+
SIZE: {{ release.size.zip }}
286+
SHA1: {{ release.sha1.zip }}
287+
SHA256: {{ release.sha256.zip }}
288+
SHA512: {{ release.sha512.zip }}
289+
290+
## What is Ruby
291+
292+
Ruby was first developed by Matz (Yukihiro Matsumoto) in 1993,
293+
and is now developed as Open Source. It runs on multiple platforms
294+
and is used all over the world especially for web development.

0 commit comments

Comments
 (0)