"title"=>"Ruby 3.3.0-rc1 Released",
"summary"=>"\n
We are pleased to announce the release of Ruby 3.3.0-rc1. 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.
\n\nAfter the release of RC1, we will avoid introducing ABI incompatibilities wherever possible. If we need to do, we’ll announce it in the release note.
\n\nPrism
\n\n- \n
- Introduced the Prism parser as a default gem\n
- \n
- Prism is a portable, error tolerant, and maintainable recursive descent parser for the Ruby language \n
\n - Prism is production ready and actively maintained, you can use it in place of Ripper\n
- \n
- There is extensive documentation on how to use Prism \n
- 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 \n
- Notable methods in the Prism API are:\n
- \n
Prism.parse(source)
which returns the AST as part of a ParseResult \n Prism.dump(source)
which returns the serialized AST as a String \n Prism.parse_comments(source)
which returns the comments \n
\n
\n - You can make pull requests or issues directly on the Prism repository if you are interested in contributing \n
Use Lrama instead of Bison
\n\n- \n
- Replace Bison with Lrama LALR parser generator Feature #19637\n
- \n
- If you have interest, please see The future vision of Ruby Parser \n
- Lrama internal parser is replaced with LR parser generated by Racc for maintainability \n
- Parameterizing Rules
(?, *, +)
are supported, it will be used in Ruby parse.y \n
\n
RJIT
\n\n- \n
- Introduced a pure-Ruby JIT compiler RJIT and replaced MJIT.\n
- \n
- RJIT supports only x86-64 architecture on Unix platforms. \n
- Unlike MJIT, it doesn’t require a C compiler at runtime. \n
\n - RJIT exists only for experimental purposes.\n
- \n
- You should keep using YJIT in production. \n
\n - If you are interested in developing JIT for Ruby, please check out k0kubun’s presentation on Day 3 of RubyKaigi. \n
YJIT
\n\n- \n
- Major performance improvements over 3.2\n
- \n
- Support for splat and rest arguments has been improved. \n
- Registers are allocated for stack operations of the virtual machine. \n
- More calls with optional arguments are compiled. \n
- Exception handlers are also compiled. \n
- Instance variables no longer exit to the interpreter\nwith megamorphic object shapes. \n
- Unsupported call types no longer exit to the interpreter. \n
Integer#!=
,String#!=
,Kernel#block_given?
,Kernel#is_a?
,\nKernel#instance_of?
,Module#===
are specially optimized. \n - Now more than 3x faster than the interpreter on optcarrot! \n
\n - Significantly improved memory usage over 3.2\n
- \n
- Metadata for compiled code uses a lot less memory. \n
- Generate more compact code on ARM64 \n
\n - Compilation speed is now slightly faster than 3.2. \n
- Add
RubyVM::YJIT.enable
that can enable YJIT at run-time\n- \n
- You can start YJIT without modifying command-line arguments or environment variables. \n
- This can also be used to enable YJIT only once your application is\ndone booting.
--yjit-disable
can be used if you want to use other\nYJIT options while disabling YJIT at boot. \n
\n - Code GC is now disabled by default, and
--yjit-exec-mem-size
is treated\nas a hard limit where compilation of new code stops.\n- \n
- Better copy-on-write behavior on servers using unicorn and forking \n
- No sudden drops in performance due to code GC. \n
- You can still enable code GC if desired with
--yjit-code-gc
\n
\n ratio_in_yjit
stat produced by--yjit-stats
is now available in release builds,\na special stats or dev build is no longer required to access most stats. \n - Exit tracing option now supports sampling\n
- \n
--trace-exits-sample-rate=N
\n
\n --yjit-perf
is added to facilitate profiling with Linux perf. \n - More thorough testing and multiple bug fixes \n
M:N thread scheduler
\n\n- \n
- M:N thread scheduler was introduced. [Feature #19842]\n
- \n
- M Ruby threads are managed by N native threads (OS threads) so the thread creation and management cost are reduced. \n
- It can break C-extension compatibility so that M:N thread scheduler is disabled on the main Ractor by default.\n
- \n
RUBY_MN_THREADS=1
environment variable enables M:N threads on the main Ractor. \n - M:N threads are enabled on non-main Ractors. \n
\n RUBY_MAX_CPU=n
environment variable sets maximum number ofN
(maximum number of native threads). The default value is 8.\n- \n
- 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. \n - To support blocking operations, more than
N
native threads can be used. \n
\n - 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
\n
Other Notable New Features
\n\nLanguage
\n\nPerformance improvements
\n\n- \n
defined?(@ivar)
is optimized with Object Shapes. \n - Name resolution such as
Socket.getaddrinfo
can now be interrupted (in environments where pthreads are available). Feature #19965\n- \n
- 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. \n
\n - Several performance improvements to the Garbage Collector\n
- \n
- Young objects referenced by old objects are no longer immediately\n promoted to the old generation. This significantly reduces the frequency of\n major GC collections. [Feature #19678] \n
- A new
REMEMBERED_WB_UNPROTECTED_OBJECTS_LIMIT_RATIO
tuning variable was\n introduced to control the number of unprotected objects cause a major GC\n collection to trigger. The default is set to0.01
(1%). This significantly\n reduces the frequency of major GC collection. [Feature #19571] \n - Write Barriers were implemented for many core types that were missing them,\n notably
Time
,Enumerator
,MatchData
,Method
,File::Stat
,BigDecimal
\n and several others. This significantly reduces minor GC collection time and major\n GC collection frequency. \n - Most core classes are now using Variable Width Allocation, notably
Hash
,Time
,\nThread::Backtrace
,Thread::Backtrace::Location
,File::Stat
,Method
.\n This makes these classes faster to allocate and free, use less memory and reduce\n heap fragmentation. \n - Support for weak references has been added to the garbage collector. [Feature #19783] \n
\n
Other notable changes since 3.2
\n\nIRB
\n\nIRB has received several enhancements, including but not limited to:
\n\n- \n
- Advanced
irb:rdbg
integration that provides an equivalent debugging experience topry-byebug
(doc). \n - Pager support for
ls
,show_source
andshow_cmds
commands. \n - More accurate and helpful information provided by the
ls
andshow_source
commands. \n - Experimental autocompletion using type analysis (doc). \n
- It is now possible to change the font color and font style in the completion dialog by a newly introduced class Reline::Face (doc) \n
In addition, IRB has also undergone extensive refactoring and received dozens of bug fixes to facilitate easier future enhancements.
\n\nCompatibility issues
\n\nNote: Excluding feature bug fixes.
\n\n- \n
it
calls without arguments in a block with no ordinary parameters are\ndeprecated.it
will be a reference to the first block parameter in Ruby 3.4.\nFeature #18980 \n
Removed constants
\n\nThe following deprecated constants are removed.
\n\nRemoved methods
\n\nThe following deprecated methods are removed.
\n\nRemoved environment variables
\n\nThe following deprecated environment variables are removed.
\n\n- \n
- Environment variable
RUBY_GC_HEAP_INIT_SLOTS
has been deprecated and is a no-op. Please use environment variablesRUBY_GC_HEAP_{0,1,2,3,4}_INIT_SLOTS
instead. Feature #19785 \n
Stdlib compatibility issues
\n\next/readline
is retired
\n\n- \n
- We have
reline
that is pure Ruby implementation compatible withext/readline
API. We rely onreline
in the future. If you need to useext/readline
, you can installext/readline
via rubygems.org withgem install readline-ext
. \n - We no longer need to install libraries like
libreadline
orlibedit
. \n
C API updates
\n\nUpdated C APIs
\n\nThe following APIs are updated.
\n\nRemoved C APIs
\n\nThe following deprecated APIs are removed.
\n\nStandard library updates
\n\nRubyGems and Bundler warn if users require gem that is scheduled to become the bundled gems in the future version of Ruby.
\n\nTargeted libraries are:
\n- \n
- abbrev \n
- base64 \n
- bigdecimal \n
- csv \n
- drb \n
- getoptlong \n
- mutex_m \n
- nkf \n
- observer \n
- racc \n
- resolv-replace \n
- rinda \n
- syslog \n
The following default gem is added.
\n\n- \n
- prism 0.15.1 \n
The following default gems are updated.
\n\n- \n
- RubyGems 3.5.0.dev \n
- base64 0.2.0 \n
- benchmark 0.3.0 \n
- bigdecimal 3.1.5 \n
- bundler 2.5.0.dev \n
- cgi 0.4.0 \n
- csv 3.2.8 \n
- date 3.3.4 \n
- delegate 0.3.1 \n
- drb 2.2.0 \n
- english 0.8.0 \n
- erb 4.0.3 \n
- etc 1.4.3.dev.1 \n
- fcntl 1.1.0 \n
- fiddle 1.1.2 \n
- fileutils 1.7.2 \n
- find 0.2.0 \n
- getoptlong 0.2.1 \n
- io-console 0.6.1.dev \n
- irb 1.8.3 \n
- logger 1.6.0 \n
- mutex_m 0.2.0 \n
- net-http 0.4.0 \n
- net-protocol 0.2.2 \n
- nkf 0.1.3 \n
- observer 0.1.2 \n
- open-uri 0.4.0 \n
- open3 0.2.0 \n
- openssl 3.2.0 \n
- optparse 0.4.0 \n
- ostruct 0.6.0 \n
- pathname 0.3.0 \n
- pp 0.5.0 \n
- prettyprint 0.2.0 \n
- pstore 0.1.3 \n
- psych 5.1.1.1 \n
- rdoc 6.6.0 \n
- reline 0.3.9 \n
- rinda 0.2.0 \n
- securerandom 0.3.0 \n
- shellwords 0.2.0 \n
- singleton 0.2.0 \n
- stringio 3.0.9 \n
- strscan 3.0.7 \n
- syntax_suggest 1.1.0 \n
- tempfile 0.2.0 \n
- time 0.3.0 \n
- timeout 0.4.1 \n
- tmpdir 0.2.0 \n
- tsort 0.2.0 \n
- un 0.3.0 \n
- uri 0.13.0 \n
- weakref 0.1.3 \n
- win32ole 1.8.10 \n
- yaml 0.3.0 \n
- zlib 3.1.0 \n
The following bundled gem is promoted from default gems.
\n\n- \n
- racc 1.7.3 \n
The following bundled gems are updated.
\n\n- \n
- minitest 5.20.0 \n
- rake 13.1.0 \n
- test-unit 3.6.1 \n
- rexml 3.2.6 \n
- rss 0.3.0 \n
- net-imap 0.4.4 \n
- net-smtp 0.4.0 \n
- rbs 3.2.2 \n
- typeprof 0.21.8 \n
- debug 1.8.0 \n
See GitHub releases like Logger or\nchangelog for details of the default gems or bundled gems.
\n\nSee NEWS\nor commit logs\nfor more details.
\n\nWith those changes, 5414 files changed, 306141 insertions(+), 183575 deletions(-)\nsince Ruby 3.2.0!
\n\nDownload
\n\n- \n
- \n
https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.tar.gz
\n\n\nSIZE: 21783575\nSHA1: c75a860e06f27b7f69b874757417277c21d1d3f4\nSHA256: c4ff82395a90ef76c7f906b7687026e0ab96b094dcf3a532d9ab97784a073222\nSHA512: 265fb2ffe55af47d8349edffcebe749cc170291227cef55529fe4e67363e4e84b88daa34ffb5364a99c8a0e32110266a34c9a11d62f3bd6f6d47fa76eca641f4\n
\n - \n
https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.tar.xz
\n\n\nSIZE: 16163884\nSHA1: 26503f9bdc7d0a05aaa9836f54d3aa9e74a9ead9\nSHA256: 051815637f1fa75a1edf2c54b66d5d5b69563daad777da8dc39543b7754b5290\nSHA512: 82f4acfaad1dc47db27ee3eb952481a95b3474a98059e9e9f5ceb035b690d1faabe99f2ec52371c4089ed1615eb10c395f029088418fec4d26399b65b4f259b9\n
\n - \n
https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.zip
\n\n\nSIZE: 26735443\nSHA1: 35583453a7734216b08829ef0ec9ea1bc0d4ae7f\nSHA256: 56dd82e1dd714f2889ca975ae7befbe005675de08839c2cc4a484de2ae65201c\nSHA512: 7fbe414c230aedc9f364512bcbc213038f8f6e4268929a559d2527e2f3e32a140b394e37098ab7e59161236eca8b89cc9e52d73a3be8d7bd44faa91681483f5d\n
\n
What is Ruby
\n\nRuby was first developed by Matz (Yukihiro Matsumoto) in 1993,\nand is now developed as Open Source. It runs on multiple platforms\nand is used all over the world especially for web development.
\n\nPosted by naruse on 11 Dec 2023
","content"=>nil,
"author"=>nil,
"link"=>"https://www.ruby-lang.org/en/news/2023/12/11/ruby-3-3-0-rc1-released/",
"published_date"=>Mon, 11 Dec 2023 00:00:00.000000000 UTC +00:00,
"image_url"=>nil,
"feed_url"=>"https://www.ruby-lang.org/en/news/2023/12/11/ruby-3-3-0-rc1-released/",
"language"=>nil,
"active"=>true,
"ricc_source"=>"feedjira::v1",
"created_at"=>Wed, 03 Apr 2024 14:31:18.888285000 UTC +00:00,
"updated_at"=>Mon, 13 May 2024 19:03:05.369822000 UTC +00:00,
"newspaper"=>"Ruby (EN RSS)",
"macro_region"=>"Technology"}