mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
stop warnings in the test; ref #3280
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user