Repository navigation
IronRuby 4.0.2 runs a Rails 8.1 app with SQLite on Windows, is about 1.2 times as fast
across IronRuby's micro benchmarks and starts in 1.25 s instead of 1.86 s, serves TLS through
net/http and Puma, and calls .NET the way Ruby 4 code is written. The legacy parser and the
Ruby 1.9 library are gone. The interpreter is now called ironruby, as JRuby's is jruby,
and every download comes with a signed build provenance attestation.
Download
Self-contained: unpack one and run ./ironruby, ./irb.sh and ./igem.sh - on Windows
ironruby.cmd, irb.cmd and igem.cmd. No .NET to install. ir.sh and ir.cmd still
work.
- Windows x64:
ironruby-4.0.2-win-x64.zip, with Windows Forms, WPF,ironrubyw.exe
andSamples\Notepad\notepad.cmd - Linux x64:
ironruby-4.0.2-linux-x64.tar.gz - macOS arm64:
ironruby-4.0.2-osx-arm64.tar.gz, built in CI, not tested there
SHA256SUMS lists the checksums. Each archive and SHA256SUMS has a signed build
provenance attestation, which says which workflow built it, from which commit, in which run:
gh attestation verify ironruby-4.0.2-linux-x64.tar.gz --repo Largo/ironruby
New
- Rails 8.1 with SQLite on Windows (#34).
gem install rails,rails new,
bundle install, a scaffold, migrations, importmap with Turbo and Stimulus, and
bin/rails serveron Puma and sqlite3, as a Windows user would run them. It took
File#flockon Windows, IO readiness without libc, Bundler'splatforms:for IronRuby,
binstubs that start IronRuby, and a dozen more fixes, listed in
Docs/rails-on-windows.md.
In a sweep of popular gems on Windows, 81 give the same output as CRuby byte for byte,
among them rubocop, standard, rspec, pry, prawn, sprockets and listen. - Faster (#22). IronRuby's 50 micro benchmarks run in 11.2 s instead of 26.1 s (geometric
mean 1.21x): switching fibers is 7.1x as fast,raise/rescue5.5x, keyword arguments
about 9x, near CRuby's time.ironruby -e 1starts in about 1.25 s instead of 1.86 s. - TLS (#28, #32, #33).
OpenSSL::SSL::SSLSocketis non-blocking, so net/http's open,
read and write timeouts work unmodified, for RubyGems too; certificates are verified
against the context's CAs, withverify_callback. Puma servesssl://. - Calling .NET (#26, #31, #25). Keyword arguments bind to parameters by name, a block
goes to the trailing delegate parameter (list.Sort { |a, b| b <=> a },Task.Run { }),
and the split .NET libraries load on demand, soSystem::Consolejust works.superin
initializeruns the .NET base constructor. Stores into a boxed struct's field stick,
zlib works on Windows, and so doProcess.killandFile::NULL. - Ruby 4.0 (#23, #30). Many core classes now behave as CRuby 4.0's, found by running
IronRuby and CRuby side by side and by ruby/spec.RationalandComplexare ports of
CRuby 4.0's, andPathnameis CRuby 4.0's own. - prism 2.0 (#27). IronRuby follows ruby/prism's new serialization, and deeply nested
code runs instead of overflowing the stack.
Changed
- The interpreter is
ironruby(#35), and so is RbConfig'sruby_install_name: the
binstubs Bundler and Rails write start#!/usr/bin/env ironruby, a line Ruby runs as
Ruby.ir,ir.shandir.cmdstay as its short name. On Windows,ironrubyw.exeis
the same interpreter without a console window, asrubyw.exeis CRuby's; the Notepad
sample starts with it. ironrubywith no script reads the program from stdin (#35), asrubydoes, at a terminal
too, and$0is"-". It used to start the DLR's interactive console; irb isirbor
iirb.- Prism is the only parser (#34).
-X:UsePrismis still accepted and does nothing. - Gems written for prism 1.x or bigdecimal 2.x and 3.x activate with the built-in
prism 2.0 and bigdecimal 4.0 (#34): rubocop, standard, minitest 6 and prawn among them. - Windows: file names,
ENV,ARGVand the default external encoding are UTF-8, as in
CRuby;Dir.pwdkeeps a short 8.3 path as it was given;Dir.homeuses/; local time
follows daylight saving time (#19). - The Ruby 1.9 library is removed (#29, #30), including its
cgicode with known
vulnerabilities and awin32/sspithat wrote past its buffers on 64-bit Windows.
Security and auditing
- Signed build provenance for every published file, made by GitHub's
actions/attestin
the job that built it (#36). - The repository holds no programs any more: 18 test fixtures and sample DLLs from 2016,
which nothing built or shipped, are gone, and CI fails if one comes back (#36). The
upstream checkouts the build uses are pinned (#29).
Thanks
@khasinski for File#flock on macOS (#17) and for
ir -S <gem executable> finding RubyGems' binstubs (#18).
Known limits
- The release targets .NET 8, whose support ends on 10 November 2026.
- macOS is built, not tested. The full status is in the
README.
What's Changed
- prism: follow ruby/prism cd76b0d1 (attach_comments) - fixes red CI by @Largo in #21
- Time: follow daylight saving time on Windows by @Largo in #19
- ir.cmd: put RubyGems' bindir on RUBYPATH, so
ir -S <gem executable>finds its binstub by @Largo in #20 - File#flock: offer flock(2) on macOS, where the rest of Posix is not by @khasinski in #17
- ir.sh: put RubyGems' bindir on RUBYPATH, so
ir -S <gem executable>finds its binstub by @khasinski in #18 - Speedup: method JIT, calls, blocks, exceptions and library fast paths by @Largo in #22
- Align IronRuby with Ruby 4.0 behavior: core class fixes, CI prism pin, loader fix by @Largo in #23
- Windows and CLR interop fixes: boxed struct fields, zlib, File::NULL, Process.kill, JSON control characters by @Largo in #25
- Test: a symbol in a prism-skimmed method body by @Largo in #24
- prism: follow ruby/prism 30a25553 (post-order serialization); run deeply nested code by @Largo in #27
- Dependency audit: pin upstream checkouts, drop obsolete and vulnerable 1.9-era code by @Largo in #29
- net/http over TLS: non-blocking SSLSocket, timeouts, and the context's CAs by @Largo in #28
- Replace the Ruby 1.9 library tree with Ruby 4.0 implementations by @Largo in #30
- CLR interop gaps: super into CLR constructors, CLR constants, strings for Object parameters by @Largo in #31
- CLR interop for modern Ruby: keywords, blocks and delegates, pattern matching, on-demand BCL loading by @Largo in #26
- puma: serve TLS - Puma::MiniSSL::Engine on SslStream by @Largo in #32
- SSLSocket#write_nonblock: hand over up to 1 MB, convert only that (flaky NetHttp_Tls1) by @Largo in #33
- Remove the legacy parser; run Rails 8.1 + SQLite and popular gems on Windows by @Largo in #34
- Call the interpreter ironruby, as JRuby's is jruby; ir stays its short name by @Largo in #35
- Release: signed build provenance for every published file by @Largo in #36
- IronRuby 4.0.2 by @Largo in #37
New Contributors
- @khasinski made their first contribution in #17
Full Changelog: v4.0.1...v4.0.2