Skip to content

Replace the Ruby 1.9 library tree with Ruby 4.0 implementations - #30

Merged
Largo merged 2 commits into
masterfrom
claude/youthful-pasteur-gu7ffz
Oct 27, 2026
Merged

Largo merged 2 commits into
masterfrom
claude/youthful-pasteur-gu7ffz

Conversation

@Largo

@Largo Largo commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Removes Src/StdLib/ruby/1.9.1 entirely. Everything in it that was still reached at runtime now comes from Ruby 4.0 sources.

Changes

  • Rational and Complex are Ruby ports of CRuby 4.0's rational.c and complex.c (Src/StdLib/ironruby/ironruby/rational.rb, complex.rb). They include the methods those files define on Integer, Float, Numeric, String and Kernel, plus the Rational/Complex branches of numeric.c's Integer#** and Float#**. This replaces complex18.rb/rational18.rb and removes:

    • ~1,400 lines of patches in ruby4.rb
    • the C# autoload hack (ObjectOps.___Numerics__) and the Kernel#Complex/#Rational stubs
    • C# Integer#quo (which returned a Float), Integer#to_r and String#to_r

    Fixnum +/* now hand a Complex operand to Complex#+/#* as numeric.c does, so 7 * Complex(1/2r, 3) gives ((7/2)+21i).

  • Pathname is CRuby 4.0's pathname_builtin.rb (autoloaded), plus lib/pathname.rb (find, rmtree, mktmpdir), which require "pathname" loads. The loader now loads a foo.rb it finds even when only foo.so is in $", as MRI's search_required does. ironruby/enumerator.rb is deleted: it loaded an empty assembly and would otherwise have started being loaded.

  • Other files still reached now have 4.0 versions under ironruby/:

    • from Ruby 4.0: digest/sha2, json/add/*, json/generic_object, ripper/filter
    • JSON.create_id/create_id= added to json.rb
    • small files that just load IronRuby's own library: json/common|ext|version, ripper/core|lexer|sexp, openssl/digest, openssl/x509
    • bigdecimal/math|jacobian|ludcmp|newton from bigdecimal 4.0.1. This needed BigDecimal::Internal, #_decimal_shift, #n_significant_digits, and two C# fixes: BigDecimal / Integer returned a Float, and BigDecimal.limit(nil) raised.
    • kconv from nkf 0.2.0; NKF's constants are now Encodings, as in nkf 0.2.0
  • Dropped: the rest of the tree is libraries Ruby 4.0 doesn't have (cgi pieces, date/delta, digest/hmac, old irb files, psych/deprecated, dl, syck, shell, xmlrpc, mathn, …). The old win32/resolv/win32/registry needed DL, which IronRuby never had, so they already failed on Windows.

  • References removed from ir.sh, ir.cmd, the native-AOT tools, irubyc bundles (ALWAYS_COPIED is now just ironruby), the C# default load path, RubyGems' stdlib dirs, default.mspec, the CI parse sweep and the default gemspecs.

  • Left alone: site_ruby/1.9.1 (rb-readline) is a separate folder. RbConfig::CONFIG["ruby_version"] stays "1.9.1" because it names that folder.

Verification

Compared against a build of master (d8088c6a), ruby/spec dda28d04, mspec b79c65ed, net8.0:

Suite master this PR CRuby 4.0.9
core/complex, numeric, float 0 0 0
core/rational 4 errors 4 errors (same examples) 0
core/integer 15 errors 15 errors (same examples) 1 failure (harness: ruby_exe passes IronRuby's -X: flags)
library/pathname 5 errors 0 0
core/kernel Complex/Rational, core/marshal, core/math, core/time 0 0
All of spec/core 48 failing 46 failing
All of spec/library 10 failing 7 failing
language / command_line / security 1 / 0 / 0 1 / 0 / 0, same examples
IronRuby.Tests — passed, 0 failures
  • Rational and Integer errors: all 19 come from mspec's fixnum_max/fixnum_min helpers, which have no case for IronRuby. CRuby passes those examples.
  • TCPSocket: the two TCPSocket.open timeout examples that show up as new in the library sweep give 6 errors on both builds when that directory is rerun alone. The host refuses the connection instead of timing out.

Comparison with CRuby 4.0.9

CRuby 4.0.9 was built from the ruby_4_0 branch (9bcca300), with bigdecimal 4.0.1 and nkf 0.2.0.

  • Rational/Complex, 5,399 expressions: master matched 5,205 and this PR matches 5,356. No expression that matched before stops matching. The 43 that still differ predate this PR:
    • 36 are Integer#fdiv(Complex): the C# fdiv returns a Complex where CRuby raises RangeError.
    • 7 are Math.hypot last-digit precision, seen through Complex#abs/#**.
  • Huge exponents: Integer/Rational/Complex ** Bignum match exactly, including ArgumentError: exponent is too large and the b may be too big warning.
  • Identical to CRuby 4.0: the BigMath, LUSolve and _decimal_shift probes (26 values) and the Ripper::Filter output.
  • Pathname: matches, except that the autoloaded pathname_builtin.rb appears in $". The old 1.9 pathname.rb did too.
  • json/add to_json: matches except BigDecimal (_dump precision 9 vs 18) and Date/DateTime (Date#start is 2299161 rather than 2299161.0). Both are older C# issues; before this PR json/add/core raised NoMethodError.
  • kconv: matches except Kconv.guess on Shift_JIS bytes (Windows-31J vs Shift_JIS), which comes from nkf.rb's guess logic.

Known gaps, not addressed here

  • The C# JSON generator ignores user to_json, and create_additions: is unimplemented. So JSON.generate(1..3) still gives "1..3", although (1..3).to_json matches CRuby.
  • Integer#fdiv(Complex) returns a Complex where CRuby raises RangeError.
  • Math.hypot is off in the last digit.
  • Kconv.guess answers Windows-31J for Shift_JIS.
  • BigDecimal("1")/3 keeps 18 digits where CRuby keeps 32. BigDecimal#_dump reports precision 9 where CRuby reports 18.
  • Date#start returns an Integer instead of a Float.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KPwZf3xeDNiCfR2W334Av9

Rational and Complex are now Ruby ports of CRuby 4.0's rational.c and
complex.c (Src/StdLib/ironruby/ironruby/rational.rb, complex.rb), with the
methods those files define on Integer, Float, Numeric, String and Kernel and
the Rational/Complex branches of numeric.c's Integer#** and Float#**. They
replace complex18.rb/rational18.rb and the ~1,400 lines of ruby4.rb that
patched their 1.8 behaviour, along with the C# autoload hack (ObjectOps
___Numerics__), the Kernel#Complex/#Rational stubs, Integer#quo returning a
Float, and the C# Integer#to_r/String#to_r. Fixnum + and * hand a Complex
operand to Complex#+/#* as numeric.c does.

Pathname is CRuby 4.0's pathname_builtin.rb (autoloaded) plus lib/pathname.rb
(find, rmtree, mktmpdir), loaded by `require "pathname"`: the loader now lets
a .rb found on the path through when only "foo.so" is in $", as MRI's
search_required does.

Everything else still reached in ruby/1.9.1 gets a 4.0 version under
ironruby/: digest/sha2, json/add/* and json/generic_object (plus
JSON.create_id), json/common|ext|version, ripper/filter and ripper/core|
lexer|sexp, bigdecimal/math|jacobian|ludcmp|newton from bigdecimal 4.0.1
(with BigDecimal::Internal, #_decimal_shift, #n_significant_digits, Integer
divisors for BigDecimal#/ and BigDecimal.limit(nil)), kconv from nkf 0.2.0
(NKF's codes are now Encodings), openssl/digest and openssl/x509. The rest
of the tree is libraries Ruby 4.0 no longer has.

ruby/1.9.1 is deleted and dropped from ir.sh, ir.cmd, the AOT tools, irubyc
bundles, the default load path, RubyGems' stdlib dirs, default.mspec and CI.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KPwZf3xeDNiCfR2W334Av9
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 234 files, which is 134 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Check out review usage here.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 518dc595-6150-48f5-81d9-7d0b6151d8cc
Commits

Reviewing files that changed from the base of the PR and between d65fe20 and 3a4f801.

Files ignored due to path filters: 1
  • Src/Libraries/Initializers.Generated.cs is excluded by !**/*.generated.*
Files selected for processing: 234
  • .github/workflows/ci.yml
  • README.md
  • Samples/Notepad/notepad.cmd
  • Src/Libraries/BigDecimal/BigDecimalOps.cs
  • Src/Libraries/Builtins/Integer.cs
  • Src/Libraries/Builtins/KernelOps.cs
  • Src/Libraries/Builtins/MutableStringOps.cs
  • Src/Libraries/Builtins/Numeric.cs
  • Src/Libraries/Builtins/ObjectOps.cs
  • Src/Libraries/Builtins/RubyTimeOps.cs
  • Src/Libraries/Extensions/ClrBigInteger.cs
  • Src/Libraries/Extensions/ClrInteger.Int64.cs
  • Src/Libraries/Extensions/ClrInteger.cs
  • Src/Prism/README.md
  • Src/Ruby/Runtime/Loader.cs
  • Src/Ruby/Runtime/RubyContext.cs
  • Src/Ruby/Runtime/RubyStackTraceBuilder.cs
  • Src/StdLib/ironruby/bigdecimal.rb
  • Src/StdLib/ironruby/bigdecimal/jacobian.rb
  • Src/StdLib/ironruby/bigdecimal/ludcmp.rb
  • Src/StdLib/ironruby/bigdecimal/math.rb
  • Src/StdLib/ironruby/bigdecimal/newton.rb
  • Src/StdLib/ironruby/digest/sha2.rb
  • Src/StdLib/ironruby/enumerator.rb
  • Src/StdLib/ironruby/ironruby/compiler.rb
  • Src/StdLib/ironruby/ironruby/compiler/apphost.cs
  • Src/StdLib/ironruby/ironruby/complex.rb
  • Src/StdLib/ironruby/ironruby/pathname_builtin.rb
  • Src/StdLib/ironruby/ironruby/rational.rb
  • Src/StdLib/ironruby/json.rb
  • Src/StdLib/ironruby/json/add/bigdecimal.rb
  • Src/StdLib/ironruby/json/add/complex.rb
  • Src/StdLib/ironruby/json/add/core.rb
  • Src/StdLib/ironruby/json/add/date.rb
  • Src/StdLib/ironruby/json/add/date_time.rb
  • Src/StdLib/ironruby/json/add/exception.rb
  • Src/StdLib/ironruby/json/add/ostruct.rb
  • Src/StdLib/ironruby/json/add/range.rb
  • Src/StdLib/ironruby/json/add/rational.rb
  • Src/StdLib/ironruby/json/add/regexp.rb
  • Src/StdLib/ironruby/json/add/set.rb
  • Src/StdLib/ironruby/json/add/string.rb
  • Src/StdLib/ironruby/json/add/struct.rb
  • Src/StdLib/ironruby/json/add/symbol.rb
  • Src/StdLib/ironruby/json/add/time.rb
  • Src/StdLib/ironruby/json/common.rb
  • Src/StdLib/ironruby/json/ext.rb
  • Src/StdLib/ironruby/json/generic_object.rb
  • Src/StdLib/ironruby/json/version.rb
  • Src/StdLib/ironruby/kconv.rb
  • Src/StdLib/ironruby/nkf.rb
  • Src/StdLib/ironruby/openssl/digest.rb
  • Src/StdLib/ironruby/openssl/x509.rb
  • Src/StdLib/ironruby/pathname.rb
  • Src/StdLib/ironruby/rbconfig.rb
  • Src/StdLib/ironruby/ripper/core.rb
  • Src/StdLib/ironruby/ripper/filter.rb
  • Src/StdLib/ironruby/ripper/lexer.rb
  • Src/StdLib/ironruby/ripper/sexp.rb
  • Src/StdLib/ironruby/ruby4.rb
  • Src/StdLib/ruby/1.9.1/English.rb
  • Src/StdLib/ruby/1.9.1/Win32API.rb
  • Src/StdLib/ruby/1.9.1/bigdecimal/math.rb
  • Src/StdLib/ruby/1.9.1/bigdecimal/util.rb
  • Src/StdLib/ruby/1.9.1/cgi.rb
  • Src/StdLib/ruby/1.9.1/cgi/util.rb
  • Src/StdLib/ruby/1.9.1/complex18.rb
  • Src/StdLib/ruby/1.9.1/date.rb
  • Src/StdLib/ruby/1.9.1/date/delta.rb
  • Src/StdLib/ruby/1.9.1/date/delta/parser.rb
  • Src/StdLib/ruby/1.9.1/date/delta/parser.ry
  • Src/StdLib/ruby/1.9.1/date/format.rb
  • Src/StdLib/ruby/1.9.1/delegate.rb
  • Src/StdLib/ruby/1.9.1/digest.rb
  • Src/StdLib/ruby/1.9.1/digest/hmac.rb
  • Src/StdLib/ruby/1.9.1/digest/sha2.rb
  • Src/StdLib/ruby/1.9.1/erb.rb
  • Src/StdLib/ruby/1.9.1/fiddle.rb
  • Src/StdLib/ruby/1.9.1/fiddle/closure.rb
  • Src/StdLib/ruby/1.9.1/fiddle/function.rb
  • Src/StdLib/ruby/1.9.1/fileutils.rb
  • Src/StdLib/ruby/1.9.1/find.rb
  • Src/StdLib/ruby/1.9.1/forwardable.rb
  • Src/StdLib/ruby/1.9.1/ipaddr.rb
  • Src/StdLib/ruby/1.9.1/irb.rb
  • Src/StdLib/ruby/1.9.1/irb/cmd/chws.rb
  • Src/StdLib/ruby/1.9.1/irb/cmd/fork.rb
  • Src/StdLib/ruby/1.9.1/irb/cmd/help.rb
  • Src/StdLib/ruby/1.9.1/irb/cmd/load.rb
  • Src/StdLib/ruby/1.9.1/irb/cmd/nop.rb
  • Src/StdLib/ruby/1.9.1/irb/cmd/pushws.rb
  • Src/StdLib/ruby/1.9.1/irb/cmd/subirb.rb
  • Src/StdLib/ruby/1.9.1/irb/completion.rb
  • Src/StdLib/ruby/1.9.1/irb/context.rb
  • Src/StdLib/ruby/1.9.1/irb/ext/change-ws.rb
  • Src/StdLib/ruby/1.9.1/irb/ext/history.rb
  • Src/StdLib/ruby/1.9.1/irb/ext/loader.rb
  • Src/StdLib/ruby/1.9.1/irb/ext/math-mode.rb
  • Src/StdLib/ruby/1.9.1/irb/ext/multi-irb.rb
  • Src/StdLib/ruby/1.9.1/irb/ext/save-history.rb
  • Src/StdLib/ruby/1.9.1/irb/ext/tracer.rb
  • Src/StdLib/ruby/1.9.1/irb/ext/use-loader.rb
  • Src/StdLib/ruby/1.9.1/irb/ext/workspaces.rb
  • Src/StdLib/ruby/1.9.1/irb/extend-command.rb
  • Src/StdLib/ruby/1.9.1/irb/frame.rb
  • Src/StdLib/ruby/1.9.1/irb/help.rb
  • Src/StdLib/ruby/1.9.1/irb/init.rb
  • Src/StdLib/ruby/1.9.1/irb/input-method.rb
  • Src/StdLib/ruby/1.9.1/irb/inspector.rb
  • Src/StdLib/ruby/1.9.1/irb/lc/error.rb
  • Src/StdLib/ruby/1.9.1/irb/lc/help-message
  • Src/StdLib/ruby/1.9.1/irb/lc/ja/encoding_aliases.rb
  • Src/StdLib/ruby/1.9.1/irb/lc/ja/error.rb
  • Src/StdLib/ruby/1.9.1/irb/lc/ja/help-message
  • Src/StdLib/ruby/1.9.1/irb/locale.rb
  • Src/StdLib/ruby/1.9.1/irb/magic-file.rb
  • Src/StdLib/ruby/1.9.1/irb/notifier.rb
  • Src/StdLib/ruby/1.9.1/irb/output-method.rb
  • Src/StdLib/ruby/1.9.1/irb/ruby-lex.rb
  • Src/StdLib/ruby/1.9.1/irb/ruby-token.rb
  • Src/StdLib/ruby/1.9.1/irb/slex.rb
  • Src/StdLib/ruby/1.9.1/irb/src_encoding.rb
  • Src/StdLib/ruby/1.9.1/irb/version.rb
  • Src/StdLib/ruby/1.9.1/irb/workspace.rb
  • Src/StdLib/ruby/1.9.1/irb/ws-for-case-2.rb
  • Src/StdLib/ruby/1.9.1/irb/xmp.rb
  • Src/StdLib/ruby/1.9.1/json.rb
  • Src/StdLib/ruby/1.9.1/json/add/core.rb
  • Src/StdLib/ruby/1.9.1/json/add/rails.rb
  • Src/StdLib/ruby/1.9.1/json/common.rb
  • Src/StdLib/ruby/1.9.1/json/editor.rb
  • Src/StdLib/ruby/1.9.1/json/ext.rb
  • Src/StdLib/ruby/1.9.1/json/version.rb
  • Src/StdLib/ruby/1.9.1/mkmf.rb
  • Src/StdLib/ruby/1.9.1/monitor.rb
  • Src/StdLib/ruby/1.9.1/net/http.rb
  • Src/StdLib/ruby/1.9.1/net/https.rb
  • Src/StdLib/ruby/1.9.1/net/protocol.rb
  • Src/StdLib/ruby/1.9.1/open-uri.rb
  • Src/StdLib/ruby/1.9.1/open3.rb
  • Src/StdLib/ruby/1.9.1/openssl.rb
  • Src/StdLib/ruby/1.9.1/openssl/bn.rb
  • Src/StdLib/ruby/1.9.1/openssl/buffering.rb
  • Src/StdLib/ruby/1.9.1/openssl/cipher.rb
  • Src/StdLib/ruby/1.9.1/openssl/digest.rb
  • Src/StdLib/ruby/1.9.1/openssl/ssl-internal.rb
  • Src/StdLib/ruby/1.9.1/openssl/ssl.rb
  • Src/StdLib/ruby/1.9.1/openssl/x509-internal.rb
  • Src/StdLib/ruby/1.9.1/openssl/x509.rb
  • Src/StdLib/ruby/1.9.1/optparse.rb
  • Src/StdLib/ruby/1.9.1/optparse/date.rb
  • Src/StdLib/ruby/1.9.1/optparse/shellwords.rb
  • Src/StdLib/ruby/1.9.1/optparse/time.rb
  • Src/StdLib/ruby/1.9.1/optparse/uri.rb
  • Src/StdLib/ruby/1.9.1/optparse/version.rb
  • Src/StdLib/ruby/1.9.1/pp.rb
  • Src/StdLib/ruby/1.9.1/prettyprint.rb
  • Src/StdLib/ruby/1.9.1/psych.rb
  • Src/StdLib/ruby/1.9.1/psych/coder.rb
  • Src/StdLib/ruby/1.9.1/psych/core_ext.rb
  • Src/StdLib/ruby/1.9.1/psych/deprecated.rb
  • Src/StdLib/ruby/1.9.1/psych/handler.rb
  • Src/StdLib/ruby/1.9.1/psych/json/tree_builder.rb
  • Src/StdLib/ruby/1.9.1/psych/nodes.rb
  • Src/StdLib/ruby/1.9.1/psych/nodes/alias.rb
  • Src/StdLib/ruby/1.9.1/psych/nodes/document.rb
  • Src/StdLib/ruby/1.9.1/psych/nodes/mapping.rb
  • Src/StdLib/ruby/1.9.1/psych/nodes/node.rb
  • Src/StdLib/ruby/1.9.1/psych/nodes/scalar.rb
  • Src/StdLib/ruby/1.9.1/psych/nodes/sequence.rb
  • Src/StdLib/ruby/1.9.1/psych/nodes/stream.rb
  • Src/StdLib/ruby/1.9.1/psych/omap.rb
  • Src/StdLib/ruby/1.9.1/psych/parser.rb
  • Src/StdLib/ruby/1.9.1/psych/scalar_scanner.rb
  • Src/StdLib/ruby/1.9.1/psych/set.rb
  • Src/StdLib/ruby/1.9.1/psych/tree_builder.rb
  • Src/StdLib/ruby/1.9.1/psych/visitors.rb
  • Src/StdLib/ruby/1.9.1/psych/visitors/emitter.rb
  • Src/StdLib/ruby/1.9.1/psych/visitors/json_tree.rb
  • Src/StdLib/ruby/1.9.1/psych/visitors/to_ruby.rb
  • Src/StdLib/ruby/1.9.1/psych/visitors/visitor.rb
  • Src/StdLib/ruby/1.9.1/psych/visitors/yaml_tree.rb
  • Src/StdLib/ruby/1.9.1/rational18.rb
  • Src/StdLib/ruby/1.9.1/rbconfig/datadir.rb
  • Src/StdLib/ruby/1.9.1/resolv.rb
  • Src/StdLib/ruby/1.9.1/ripper.rb
  • Src/StdLib/ruby/1.9.1/ripper/core.rb
  • Src/StdLib/ruby/1.9.1/ripper/lexer.rb
  • Src/StdLib/ruby/1.9.1/ripper/sexp.rb
  • Src/StdLib/ruby/1.9.1/securerandom.rb
  • Src/StdLib/ruby/1.9.1/set.rb
  • Src/StdLib/ruby/1.9.1/shellwords.rb
  • Src/StdLib/ruby/1.9.1/singleton.rb
  • Src/StdLib/ruby/1.9.1/socket.rb
  • Src/StdLib/ruby/1.9.1/tempfile.rb
  • Src/StdLib/ruby/1.9.1/thread.rb
  • Src/StdLib/ruby/1.9.1/time.rb
  • Src/StdLib/ruby/1.9.1/timeout.rb
  • Src/StdLib/ruby/1.9.1/tmpdir.rb
  • Src/StdLib/ruby/1.9.1/tsort.rb
  • Src/StdLib/ruby/1.9.1/un.rb
  • Src/StdLib/ruby/1.9.1/uri.rb
  • Src/StdLib/ruby/1.9.1/uri/common.rb
  • Src/StdLib/ruby/1.9.1/uri/ftp.rb
  • Src/StdLib/ruby/1.9.1/uri/generic.rb
  • Src/StdLib/ruby/1.9.1/uri/http.rb
  • Src/StdLib/ruby/1.9.1/uri/https.rb
  • Src/StdLib/ruby/1.9.1/uri/ldap.rb
  • Src/StdLib/ruby/1.9.1/uri/ldaps.rb
  • Src/StdLib/ruby/1.9.1/uri/mailto.rb
  • Src/StdLib/ruby/1.9.1/weakref.rb
  • Src/StdLib/ruby/1.9.1/win32ole.rb
  • Src/StdLib/ruby/1.9.1/yaml.rb
  • Src/StdLib/ruby/1.9.1/yaml/dbm.rb
  • Src/StdLib/ruby/1.9.1/yaml/store.rb
  • Src/StdLib/ruby/4.0/gem_prelude.rb
  • Src/StdLib/ruby/4.0/rubygems/defaults/ironruby.rb
  • Src/StdLib/ruby/gems/4.0.0/specifications/default/bigdecimal-4.0.1.gemspec
  • Src/StdLib/ruby/gems/4.0.0/specifications/default/date-3.3.4.gemspec
  • Src/StdLib/ruby/gems/4.0.0/specifications/default/digest-3.2.1.gemspec
  • Src/StdLib/ruby/gems/4.0.0/specifications/default/irb-1.16.0.gemspec
  • Src/StdLib/ruby/gems/4.0.0/specifications/default/json-2.18.0.gemspec
  • Src/StdLib/ruby/gems/4.0.0/specifications/default/openssl-3.2.0.gemspec
  • Src/StdLib/ruby/gems/4.0.0/specifications/default/psych-5.3.1.gemspec
  • Src/StdLib/ruby/gems/4.0.0/specifications/default/yaml-0.4.0.gemspec
  • Util/aot/IronRuby.Aot/CompileCommand.cs
  • Util/aot/NativeAot/ir-native.sh
  • Util/gems/catalog.rb
  • Util/gen-default-gemspecs.rb
  • Util/install-bundled-gems.rb
  • Util/rubybench/web-gems.md
  • default.mspec
  • ir.cmd
  • ir.sh

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…anup

master trimmed ruby/1.9.1 to 160 files; this branch removes the directory, so
the deletions stand. kconv.rb keeps nkf 0.2.0's verbatim copy: NKF's codes are
Encodings here, which master's copy worked around by naming them itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KPwZf3xeDNiCfR2W334Av9
@Largo
Largo merged commit 471260a into master Oct 27, 2026
7 checks passed
Largo pushed a commit that referenced this pull request Nov 7, 2026
Review finding (SHOULD, regression from b6a93b6): GetClrPatternSource/DecodeByteEscapes
decoded \xHH runs inside (?#...) groups and /x line comments, so
`Regexp.new("a(?#\\xff)b") =~ "ab"` and `Regexp.new("a # \\xff\nb", Regexp::EXTENDED) =~ "ab"`
raised RegexpError, and the literals /a#\xff/x and /a(?#\xff)/ were SyntaxErrors at parse
time (the literal path builds the same RubyRegex). Reproduced with review/bi2/cm.rb and
review/bi2/re1.rb #29/#30 against CRuby 4.0.9.

The decoder now steps over comments as Onigmo reads them: a (?#...) group up to the first
unescaped ")", and in extended mode - /x, or (?x) / (?x:...) for the rest of a group - a #
up to the end of the line outside a character class. RegexpTransformer's (?#...) skips an
escaped ")" too, as Onigmo does (`Regexp.new("a(?#\\)\\xff)b") =~ "ab"` is 0 in CRuby; it
was "unmatched close parenthesis" here).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KPwZf4gAJD4kdk9eEzGgYM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants