You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1af1a92
Browse filesBrowse the repository at this point in the historyBrowse files
A new rule, now in CONTRIBUTING.md: a Facets method may share a name with
one of Ruby's only if it gives Ruby's results and adds something useful.
Otherwise Facets gets out of Ruby's way. Applying it on Ruby 3.4 and 4.0:
- Hash#count gives Ruby's answers again. Facets' version counted values
instead of key-value pairs. Use hash.values.count(value) for that.
- Array#shelljoin (facets/shellwords) is Ruby's again. Facets' version
flattened nested arrays and turned hashes into options, so a value meant
as one argument, such as a web request's array parameter, could become
several. Use array.shellwords.shelljoin to get flags.
Both warn until 2027-09-30 when called the way Facets' versions were.
- Zlib.inflate and Zlib.deflate are no longer redefined as copies of
Ruby's own.
- OpenStruct#initialize calls Ruby's own and adds only the block form.
Kept, as compatible additions: Kernel#extend with a block (now a module
prepended to Kernel, so no -w warning), Pathname#glob with symbol flags,
Binding#caller and friends, Pathname#readline, Date#<=> and Time#<=>.
Bugs fixed along the way:
- facets/fileutils/ln_r replaced FileUtils.link_entry and an internal
method with old copies, so Ruby's FileUtils.cp_lr raised NameError.
ln_r now uses Ruby's link_entry.
- Pathname#glob ignored a block, and with symbol flags didn't use Ruby's
glob, so it failed in a directory with glob characters in its name.
- Kernel#extend with no arguments and no block returned the object
instead of raising ArgumentError, as Ruby's does.
- facets/digest required a file that doesn't exist.
- facets/zlib didn't require zlib or stringio.
- Hash#shellwords put quotes around values, which shelljoin then passed
as part of the value. It now gives plain words like --name=jim.
Tests can check deprecation warnings with etc/warning_recorder.rb.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments