Skip to content
Permalink
Browse files
stop warnings in the test; ref #3280
  • Loading branch information
matz committed Nov 25, 2016
1 parent 1329529 commit 743c1e7be190eca83a08b95b0f6045cbdc9ba625
Showing 1 changed file with 2 additions and 0 deletions.
@@ -160,6 +160,7 @@
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 @@
begin
Struct.new("Test", :a)
a = Struct::Test.new("a")
Struct.remove_const :Test

This comment has been minimized.

Copy link
@bouk

bouk Nov 25, 2016

Contributor

This makes the test invalid, it won't fail on previous versions

This comment has been minimized.

Copy link
@matz

matz Nov 25, 2016

Author Member

I know, but I don't want to ignore warnings in the test.

Struct.new("Test", :a, :b)
assert_raise(TypeError) do
a.initialize_copy(Struct::Test.new("a", "b"))

0 comments on commit 743c1e7

Please sign in to comment.