aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/pathname.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 2a2790c12..01746f770 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -424,6 +424,13 @@ class Pathname
end
end
private :prepend_prefix
+ elsif RUBY_VERSION == "2.0.0"
+ # https://bugs.ruby-lang.org/issues/9915
+ prepend Module.new {
+ def inspect
+ super.force_encoding(instance_variable_get(:@path).encoding)
+ end
+ }
end
end