From 2061f994e024d1d2980e7ee4962090897aeca62f Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Tue, 28 Sep 2021 09:37:07 -0500 Subject: [PATCH] Use etc instead of .so for broader compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The use of `etc.so` here requires that etc is always implemented as a C extension on-disk. However at least one impl – JRuby – currently implements it as an internal extension, loaded via a Ruby script. This require should simply use the base name of the library, `etc`, to allow Ruby-based implementations to load as well. --- lib/pp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pp.rb b/lib/pp.rb index 04b1c43..253aecb 100644 --- a/lib/pp.rb +++ b/lib/pp.rb @@ -424,7 +424,7 @@ def pretty_print(q) # :nodoc: class File < IO # :nodoc: class Stat # :nodoc: def pretty_print(q) # :nodoc: - require 'etc.so' + require 'etc' q.object_group(self) { q.breakable q.text sprintf("dev=0x%x", self.dev); q.comma_breakable