From d6aa1714fed3e8b5ee8bede00a8853c338ff6092 Mon Sep 17 00:00:00 2001 From: Andrew Konchin Date: Mon, 2 Jun 2025 19:34:54 +0300 Subject: Update to ruby/spec@4d2fc4d --- spec/ruby/core/data/shared/inspect.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'spec/ruby/core/data/shared') diff --git a/spec/ruby/core/data/shared/inspect.rb b/spec/ruby/core/data/shared/inspect.rb index 7f54a46de3..6cd5664da7 100644 --- a/spec/ruby/core/data/shared/inspect.rb +++ b/spec/ruby/core/data/shared/inspect.rb @@ -50,5 +50,13 @@ describe :data_inspect, shared: true do a.send(@method).should == "#>" end + + it "returns string representation with recursive attribute replaced with ... when an anonymous class" do + klass = Class.new(DataSpecs::Measure) + a = klass.allocate + a.send(:initialize, amount: 42, unit: a) + + a.send(@method).should =~ /#:\.\.\.>>/ + end end end -- cgit v1.2.3