aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorCharles Oliver Nutter <headius@headius.com>2021-09-28 09:37:07 -0500
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-12-18 08:38:58 +0900
commit73da1c5ea3fcc5abb1f72f70f7a3e61683368177 (patch)
tree5397ba7fc958f89cd4f1411641d19f48da52f81e /lib
parent5a6baaba3881c04534c9ad959e427ade3d5e410b (diff)
downloadruby-73da1c5ea3fcc5abb1f72f70f7a3e61683368177.tar.gz
[ruby/pp] Use etc instead of .so for broader compatibility
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. https://github.com/ruby/pp/commit/2061f994e0
Diffstat (limited to 'lib')
-rw-r--r--lib/pp.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pp.rb b/lib/pp.rb
index 4af5057e73..dd16bea222 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -433,7 +433,7 @@ end
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