add a test for #3296

This commit is contained in:
Yukihiro "Matz" Matsumoto
2016-11-30 03:51:23 +09:00
parent 37743111d9
commit 5771c9778e
+10
View File
@@ -187,3 +187,13 @@ assert("Struct.new does not allow array") do
Struct.new("Test", [:a])
end
end
assert("Struct.new generates subclass of Struct") do
begin
original_struct = Struct
Struct = String
assert_equal original_struct, original_struct.new.superclass
ensure
Struct = original_struct
end
end