Skip to content

Revive Ratch for Ruby 3 - #1

Merged
trans merged 3 commits into
masterfrom
revive
Nov 25, 2026
Merged

trans merged 3 commits into
masterfrom
revive

Conversation

@trans

@trans trans commented Nov 25, 2026

Copy link
Copy Markdown
Member

Neither 1.2.0 nor master ran on Ruby 3: file operations failed on their options, and master didn't load (an alias to a method that doesn't exist, from the last day's refactoring in 2012).

Shell

  • Paths are resolved against the shell's own directory. It no longer changes the process's working directory under a mutex for each call, so shells at different directories work side by side and from threads. Only cd with a block changes the process's directory, for the block.
  • It does its own tracing, to standard error, with paths as given (rm -r tmp, not an absolute path).
  • shell / 'lib' gives a new shell in the same mode; sh takes a command in parts, returns whether it succeeded, and is silent in quiet mode; modes can be given per command.
  • The unfinished ShellUtils refactoring is removed.

Batch and FileList

  • Batch#rm removed nothing (list = list.to_a shadowed the method); the map methods ignored their options; exists? used a method Ruby dropped.
  • Batch.new takes options last, and destinations are taken from the batch's directory.
  • FileList#ext no longer needs Rake; pathmap, which did, is removed.

Helpers

  • Kept and repaired: zlib, tar (now on RubyGems' own tar reader and writer, so minitar is gone; refuses entries that would land outside the directory), config, rdoc, email (current Net::SMTP interface; delivery itself is untested), xdg, cli.
  • Removed: ftp (referred to three names that were never defined) and pom (the POM project is gone); also the empty Ratch::System and the unfinished Ratch::Console.

ludo

Rewritten. The old one had a Ruby 1.8 shebang, dropped arguments, could only run a script given as ./name, and said nothing when it found none.

Packaging and tests

  • ratch.gemspec, Rakefile, CI on Ruby 3.1 to 4.0; version 2.0.0 (unreleased).
  • 87 tests on Spectrum, replacing the KO tests and QED demos.

🤖 Generated with Claude Code

trans and others added 3 commits November 25, 2026 00:59
Shell is rewritten to resolve paths against its own directory instead of
changing the process's, and does its own tracing. Batch and FileList are
fixed, the tar and email helpers are repaired, ludo is rewritten, and the
ftp and pom helpers, which could not run, are removed. Packaging moves to
a gemspec, and the tests to Spectrum.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
It is a bundled gem, so Bundler hides it unless it is listed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
It is a bundled gem as of Ruby 4.0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@trans
trans merged commit adbbda8 into master Nov 25, 2026
10 checks passed
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.

1 participant