From ab49e8a0f0d61ef38b4006d2e8f3976550ba23f8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 5 Oct 2025 20:12:35 +0900 Subject: [PATCH] [ruby/pp] [Feature #21389] Update rubyspec --- spec/ruby/core/set/pretty_print_cycle_spec.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/ruby/core/set/pretty_print_cycle_spec.rb b/spec/ruby/core/set/pretty_print_cycle_spec.rb index c3b383fe80..d4cca515e2 100644 --- a/spec/ruby/core/set/pretty_print_cycle_spec.rb +++ b/spec/ruby/core/set/pretty_print_cycle_spec.rb @@ -3,7 +3,12 @@ require_relative '../../spec_helper' describe "Set#pretty_print_cycle" do it "passes the 'pretty print' representation of a self-referencing Set to the pretty print writer" do pp = mock("PrettyPrint") - pp.should_receive(:text).with("#") + ruby_version_is(""..."3.5") do + pp.should_receive(:text).with("#") + end + ruby_version_is("3.5") do + pp.should_receive(:text).with("Set[...]") + end Set[1, 2, 3].pretty_print_cycle(pp) end end