aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/struct/shared/inspect.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/struct/shared/inspect.rb')
-rw-r--r--spec/ruby/core/struct/shared/inspect.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/ruby/core/struct/shared/inspect.rb b/spec/ruby/core/struct/shared/inspect.rb
new file mode 100644
index 0000000000..90594a5452
--- /dev/null
+++ b/spec/ruby/core/struct/shared/inspect.rb
@@ -0,0 +1,5 @@
+describe :struct_inspect, shared: true do
+ it "returns a string representation without the class name for anonymous structs" do
+ Struct.new(:a).new("").send(@method).should == '#<struct a="">'
+ end
+end