We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 161be68 commit 9fe1e5cCopy full SHA for 9fe1e5c
spec/ruby/core/struct/shared/inspect.rb
@@ -9,12 +9,12 @@
9
end
10
11
it "returns a string representation without the class name for structs nested in anonymous classes" do
12
- obj = Object.new
13
- obj.singleton_class.class_eval <<~DOC
+ c = Class.new
+ c.class_eval <<~DOC
14
class Foo < Struct.new(:a); end
15
DOC
16
17
- obj.singleton_class::Foo.new("").send(@method).should == '#<struct a="">'
+ c::Foo.new("").send(@method).should == '#<struct a="">'
18
19
20
it "returns a string representation without the class name for structs nested in anonymous modules" do
0 commit comments