stop warnings in the test; ref #3280

This commit is contained in:
Yukihiro "Matz" Matsumoto
2016-11-25 09:44:22 +09:00
parent 1329529f3b
commit 743c1e7be1
+2
View File
@@ -160,6 +160,7 @@ assert("Struct#dig") do
end
assert("Struct.new removes existing constant") do
skip "redefining Struct with same name cause warnings"
begin
assert_not_equal Struct.new("Test", :a), Struct.new("Test", :a, :b)
ensure
@@ -171,6 +172,7 @@ assert("Struct#initialize_copy requires struct to be the same type") do
begin
Struct.new("Test", :a)
a = Struct::Test.new("a")
Struct.remove_const :Test
Struct.new("Test", :a, :b)
assert_raise(TypeError) do
a.initialize_copy(Struct::Test.new("a", "b"))