Last active
October 28, 2024 10:58
-
-
Save skull-squadron/43a5b69037278e6075674b37bd485bb6 to your computer and use it in GitHub Desktop.
HACK Fix ruby 3.3.5 annoyance
This file contains 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
#!/usr/bin/env bash | |
set -eEuo pipefail | |
# https://stackoverflow.com/questions/79015158/why-is-gem-clean-reporting-multiple-ambiguous-references-to-the-default-psych | |
# https://stackoverflow.com/q/79015158 | |
targets() { | |
find "$(gem env home)"/specifications/default -name 'rdoc-*.gemspec' | |
} | |
readarray -t files < <(targets) | |
for file in "${files[@]}"; do | |
grep -q '%q<psych>.*4' "$file" || continue | |
cp "$file" "$file.bak" | |
sed '/%q<psych>.*4/d' "$file.bak" > "$file" | |
echo >&2 "Patched $file and saved a backup as $file.bak" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment