Pathname#inspect on Ruby 2.0 throws away the encoding of the object's
underlying string and returns a string tagged as ASCII-8BIT.
If you simply write
puts Pathname.new("some string with non-ascii bytes").inspect
no error will be raised, because the implementation of Pathname#inspect
does not call into Object#inspect.
However, if you wrap that pathname object in an array first, then
puts [Pathname.new("some string with non-ascii bytes")].inspect
will raise Encoding::CompatibilityError: "inspected result must be ASCII
only or use the same encoding with default external".
Raising an error in this codepath is new in Ruby 2.0, and this specific
bug is fixed in Ruby 2.1. I've opened a bug upstream:
https://bugs.ruby-lang.org/issues/9915
Fixes Homebrew/homebrew#29947.
Homebrew
Features, usage and installation instructions are summarized on the homepage.
What Packages Are Available?
- You can browse the Formula directory on GitHub.
- Or type
brew searchfor a list. - Or visit braumeister.org to browse packages online.
- Or visit
brew descto browse and search packages from the command line.
More Documentation
brew help or man brew or check our wiki.
Troubleshooting
First, please run brew update and brew doctor.
Second, read the Troubleshooting Checklist.
If you don't read these it will take us far longer to help you with your problem.
Who Are You?
Homebrew's current maintainers are Misty De Meo, Adam Vandenberg, Jack Nagel, Mike McQuaid and Brett Koonce.
Homebrew was originally created by Max Howell.
License
Code is under the BSD 2 Clause (NetBSD) license.
Donations
We accept tips through Gittip.
4.6.25
Latest
Languages
Ruby
92%
Shell
5.2%
Roff
2.1%
HTML
0.5%