Skip to content

Commit cc3df74

Browse files
authored
Ruby 3.4.0 RC 1 Released (#3435)
1 parent ee08563 commit cc3df74

File tree

3 files changed

+225
-1
lines changed

3 files changed

+225
-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.4.0-preview2
7+
- 3.4.0-rc1
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.4 series
2323

24+
- version: 3.4.0-rc1
25+
date: 2024-12-12
26+
post: /en/news/2024/12/12/ruby-3-4-0-rc1-released/
27+
tag: v3_4_0_rc1
28+
stats:
29+
files_changed: 4820
30+
insertions: 196907
31+
deletions: 253488
32+
url:
33+
gz: https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-rc1.tar.gz
34+
zip: https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-rc1.zip
35+
xz: https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.0-rc1.tar.xz
36+
size:
37+
gz: 23055998
38+
zip: 28323595
39+
xz: 17116016
40+
sha1:
41+
gz: 216e3085ab8b886b9f74943ee5b62bd2e3d86671
42+
zip: 4ae8ce4b15ccc3f0c6f42e408c44aa287a1ccc14
43+
xz: 1424671cdc9c4bfe3778ac159d917c8bfe6107bd
44+
sha256:
45+
gz: 1f3187d3366e90af6d760994f8bfe1fe8999a8ba3553ea4dcfae63e548236e2a
46+
zip: 653162a2db627e8e5feee22a00b20acf215509d88b06ffb281bc8788ed12c74c
47+
xz: 9c54225747f7a786727aa6213503083d5d8ff7097505d4b7456ff60880ee4a17
48+
sha512:
49+
gz: 0b0420a39c0bf3b38600d4e28805a581c4b5a6cf2abe41be8c8164276a8044a19e676de74eea5dd5b4d7d667d821a6144119795fea510fd4ba6e34865a2ae172
50+
zip: c6c6b9a0e61308e3f3303cd148613feabb2ee12d8e2fefc1f4aa1403237310f7c9be5e2031248ea89ff01cdc0bca1a66ff60f9f1f19ed9c9fccef3d7a3bbebb8
51+
xz: 5b92a2b5829ab23735617945839e45df984b319b8932e790a8e0c6f681b9bd74249511a76345516cc216c002ed7887bdd27151501491d5ecedc20acd3fb57cc5
52+
2453
- version: 3.4.0-preview2
2554
date: 2024-10-07
2655
post: /en/news/2024/10/07/ruby-3-4-0-preview2-released/
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
---
2+
layout: news_post
3+
title: "Ruby 3.4.0 rc1 Released"
4+
author: "naruse"
5+
translator:
6+
date: 2024-12-12 00:00:00 +0000
7+
lang: en
8+
---
9+
10+
{% assign release = site.data.releases | where: "version", "3.4.0-rc1" | first %}
11+
We are pleased to announce the release of Ruby {{ release.version }}.
12+
In
13+
14+
## Prism
15+
16+
Switch the default parser from parse.y to Prism. [[Feature #20564]]
17+
18+
## Modular GC
19+
20+
* Alternative garbage collector (GC) implementations can be loaded dynamically
21+
through the modular garbage collector feature. To enable this feature,
22+
configure Ruby with `--with-modular-gc` at build time. GC libraries can be
23+
loaded at runtime using the environment variable `RUBY_GC_LIBRARY`.
24+
[[Feature #20351]]
25+
26+
* Ruby's built-in garbage collector has been split into a separate file at
27+
`gc/default/default.c` and interacts with Ruby using an API defined in
28+
`gc/gc_impl.h`. The built-in garbage collector can now also be built as a
29+
library using `make modular-gc MODULAR_GC=default` and enabled using the
30+
environment variable `RUBY_GC_LIBRARY=default`. [[Feature #20470]]
31+
32+
* An experimental GC library is provided based on [MMTk](https://www.mmtk.io/).
33+
This GC library can be built using `make modular-gc MODULAR_GC=mmtk` and
34+
enabled using the environment variable `RUBY_GC_LIBRARY=mmtk`. This requires
35+
the Rust toolchain on the build machine. [[Feature #20860]]
36+
37+
38+
## Language changes
39+
40+
* String literals in files without a `frozen_string_literal` comment now behave
41+
as if they were frozen. If they are mutated a deprecation warning is emitted.
42+
These warnings can be enabled with `-W:deprecated` or by setting `Warning[:deprecated] = true`.
43+
To disable this change, you can run Ruby with the `--disable-frozen-string-literal`
44+
command line argument. [[Feature #20205]]
45+
46+
* `it` is added to reference a block parameter. [[Feature #18980]]
47+
48+
* Keyword splatting `nil` when calling methods is now supported.
49+
`**nil` is treated similarly to `**{}`, passing no keywords,
50+
and not calling any conversion methods. [[Bug #20064]]
51+
52+
* Block passing is no longer allowed in index. [[Bug #19918]]
53+
54+
* Keyword arguments are no longer allowed in index. [[Bug #20218]]
55+
56+
## YJIT
57+
58+
TL;DR:
59+
* Better performance on most benchmarks on both x86-64 and arm64 platforms.
60+
* Reduced memory usage of compilation metadata
61+
* Multiple bug fixes. YJIT is now even more robust and better tested.
62+
63+
New features:
64+
* Add unified memory limit via `--yjit-mem-size` command-line option (default 128MiB)
65+
which tracks total YJIT memory usage and is more intuitive than the
66+
old `--yjit-exec-mem-size`.
67+
* More statistics now always available via `RubyVM::YJIT.runtime_stats`
68+
* Add compilation log to track what gets compiled via `--yjit-log`
69+
* Tail of the log also available at run-time via `RubyVM::YJIT.log`
70+
* Add support for shareable consts in multi-ractor mode
71+
* Can now trace counted exits with `--yjit-trace-exits=COUNTER`
72+
73+
New optimizations:
74+
* Compressed context reduces memory needed to store YJIT metadata
75+
* Improved allocator with ability to allocate registers for local variables
76+
* When YJIT is enabled, use more Core primitives written in Ruby:
77+
* `Array#each`, `Array#select`, `Array#map` rewritten in Ruby for better performance [[Feature #20182]].
78+
* Ability to inline small/trivial methods such as:
79+
* Empty methods
80+
* Methods returning a constant
81+
* Methods returning `self`
82+
* Methods directly returning an argument
83+
* Specialized codegen for many more runtime methods
84+
* Optimize `String#getbyte`, `String#setbyte` and other string methods
85+
* Optimize bitwise operations to speed up low-level bit/byte manipulation
86+
* Various other incremental optimizations
87+
88+
## Core classes updates
89+
90+
Note: We're only listing outstanding class updates.
91+
92+
* Exception
93+
94+
* `Exception#set_backtrace` now accepts an array of `Thread::Backtrace::Location`.
95+
`Kernel#raise`, `Thread#raise` and `Fiber#raise` also accept this new format. [[Feature #13557]]
96+
97+
* Range
98+
99+
* `Range#size` now raises `TypeError` if the range is not iterable. [[Misc #18984]]
100+
101+
102+
103+
## Compatibility issues
104+
105+
Note: Excluding feature bug fixes.
106+
107+
* Error messages and backtrace displays have been changed.
108+
* Use a single quote instead of a backtick as a opening quote. [[Feature #16495]]
109+
* Display a class name before a method name (only when the class has a permanent name). [[Feature #19117]]
110+
* `Kernel#caller`, `Thread::Backtrace::Location`'s methods, etc. are also changed accordingly.
111+
112+
```
113+
Old:
114+
test.rb:1:in `foo': undefined method `time' for an instance of Integer
115+
from test.rb:2:in `<main>'
116+
117+
New:
118+
test.rb:1:in 'Object#foo': undefined method 'time' for an instance of Integer
119+
from test.rb:2:in '<main>'
120+
```
121+
122+
## C API updates
123+
124+
* `rb_newobj` and `rb_newobj_of` (and corresponding macros `RB_NEWOBJ`, `RB_NEWOBJ_OF`, `NEWOBJ`, `NEWOBJ_OF`) have been removed. [[Feature #20265]]
125+
* Removed deprecated function `rb_gc_force_recycle`. [[Feature #18290]]
126+
127+
## Miscellaneous changes
128+
129+
* Passing a block to a method which doesn't use the passed block will show
130+
a warning on verbose mode (`-w`).
131+
[[Feature #15554]]
132+
133+
* Redefining some core methods that are specially optimized by the interpeter
134+
and JIT like `String.freeze` or `Integer#+` now emits a performance class
135+
warning (`-W:performance` or `Warning[:performance] = true`).
136+
[[Feature #20429]]
137+
138+
See GitHub releases like [Logger](https://github.com/ruby/logger/releases) or
139+
changelog for details of the default gems or bundled gems.
140+
141+
See [NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md)
142+
or [commit logs](https://github.com/ruby/ruby/compare/v3_3_0...{{ release.tag }})
143+
for more details.
144+
145+
With those changes, [{{ release.stats.files_changed }} files changed, {{ release.stats.insertions }} insertions(+), {{ release.stats.deletions }} deletions(-)](https://github.com/ruby/ruby/compare/v3_3_0...{{ release.tag }}#file_bucket)
146+
since Ruby 3.3.0!
147+
148+
149+
## Download
150+
151+
* <{{ release.url.gz }}>
152+
153+
SIZE: {{ release.size.gz }}
154+
SHA1: {{ release.sha1.gz }}
155+
SHA256: {{ release.sha256.gz }}
156+
SHA512: {{ release.sha512.gz }}
157+
158+
* <{{ release.url.xz }}>
159+
160+
SIZE: {{ release.size.xz }}
161+
SHA1: {{ release.sha1.xz }}
162+
SHA256: {{ release.sha256.xz }}
163+
SHA512: {{ release.sha512.xz }}
164+
165+
* <{{ release.url.zip }}>
166+
167+
SIZE: {{ release.size.zip }}
168+
SHA1: {{ release.sha1.zip }}
169+
SHA256: {{ release.sha256.zip }}
170+
SHA512: {{ release.sha512.zip }}
171+
172+
## What is Ruby
173+
174+
Ruby was first developed by Matz (Yukihiro Matsumoto) in 1993,
175+
and is now developed as Open Source. It runs on multiple platforms
176+
and is used all over the world especially for web development.
177+
178+
[Feature #13557]: https://bugs.ruby-lang.org/issues/13557
179+
[Feature #15554]: https://bugs.ruby-lang.org/issues/15554
180+
[Feature #16495]: https://bugs.ruby-lang.org/issues/16495
181+
[Feature #18290]: https://bugs.ruby-lang.org/issues/18290
182+
[Feature #18980]: https://bugs.ruby-lang.org/issues/18980
183+
[Misc #18984]: https://bugs.ruby-lang.org/issues/18984
184+
[Feature #19117]: https://bugs.ruby-lang.org/issues/19117
185+
[Bug #19918]: https://bugs.ruby-lang.org/issues/19918
186+
[Bug #20064]: https://bugs.ruby-lang.org/issues/20064
187+
[Feature #20182]: https://bugs.ruby-lang.org/issues/20182
188+
[Feature #20205]: https://bugs.ruby-lang.org/issues/20205
189+
[Bug #20218]: https://bugs.ruby-lang.org/issues/20218
190+
[Feature #20265]: https://bugs.ruby-lang.org/issues/20265
191+
[Feature #20351]: https://bugs.ruby-lang.org/issues/20351
192+
[Feature #20429]: https://bugs.ruby-lang.org/issues/20429
193+
[Feature #20470]: https://bugs.ruby-lang.org/issues/20470
194+
[Feature #20564]: https://bugs.ruby-lang.org/issues/20564
195+
[Feature #20860]: https://bugs.ruby-lang.org/issues/20860

0 commit comments

Comments
 (0)