summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-10-05 00:06:25 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2025-10-05 15:13:53 +0900
commit4b50d0b41cc0a4c808d0d128e7068e4b3b9331bf (patch)
tree52822ba9bc8e785c84371b0b7de1b150ef1be8a4
parent340777078c88478bae1e39b10bd6409491fd584b (diff)
[ruby/pp] Do not override the methods in set.rb
These methods are defined for built-in `Set` class on Ruby 3.5. https://github.com/ruby/pp/commit/352081dbbf
-rw-r--r--lib/pp.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pp.rb b/lib/pp.rb
index f10fe7f2f0..0e55441e57 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -453,11 +453,11 @@ class Set # :nodoc:
}
}
}
- end
+ end unless method_defined?(:pretty_print)
def pretty_print_cycle(pp) # :nodoc:
pp.text sprintf('#<Set: {%s}>', empty? ? '' : '...')
- end
+ end unless method_defined?(:pretty_print_cycle)
end
class << ENV # :nodoc: