Repository navigation
Conversation
Replace the Indexer, Assembly and Travis CI files with a standard gemspec, a Rakefile and GitHub Actions, testing on Ruby 2.7 to 4.0. Require Ruby 2.7 or later. Remove Radix.metadata and the YAML file behind it, keeping Radix::VERSION as an ordinary constant, and the Float#to_r that was defined for Ruby 1.8. Fix an indentation warning. String#b without a base has been Ruby's own method since the 2.2.1 workaround. Drop the fallback for Rubies that lack it, and add a demo that checks it (#10). Bring the README up to date, and fix its examples: hex output is lower case, and [100, 10] in base 256 is 100*256 + 10. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This was referenced Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Radix's first changes since 2015. The library does what it did; this brings the project up to the Rubies and tooling in use today. No version bump: the changes are under Unreleased in
HISTORY.md.Tooling
radix.gemspec, aRakefile(rakeruns the demos; Bundler's gem tasks, tagging plain version numbers as before) and GitHub Actions on Ruby 2.7 to 4.0, with a frozen-string-literal run on 4.0..gemspec,.index,index/,Assembly,MANIFEST,.travis.yml.required_ruby_versionis>= 2.7.Code
Radix::VERSIONis an ordinary constant inlib/radix/version.rb.Radix.metadata, theconst_missingthat read other constants from it, andlib/radix.ymlare gone.Float#to_rdefined for Ruby 1.8, and fixed an indentation warning infloat.rb.String#b (#10)
Ruby has had its own
String#bsince 2.0. Radix 2.2.1 already worked around it: without a base, Radix's#bcalls Ruby's. This drops the fallback for Rubies withoutString#b, guards the alias against the file being loaded twice, documents the behaviour, and addsdemo/issues/010_string_b.md, which checks that"…".bwith Radix loaded returns a new ASCII-8BIT string with the same bytes.README
Utwice) and readme:.to_s()works with base bigger than 62. #15 (Jakukyo Friel: string output isn't limited to base 62), with their authorship.String#band on usingRadix::Integer.newdirectly.255.to_s(16)is"ff", and[100, 10]in base 256 is100*256 + 10.Testing
bundle exec rake: 8 demos, 114 steps, 259 assertions, all passing on Ruby 3.4.9, with and without--enable=frozen-string-literal, and in aruby:2.7container.ruby -wloads the library without warnings.🤖 Generated with Claude Code