Skip to content

Commit

Permalink
add a test for #3296
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Nov 29, 2016
1 parent 3774311 commit 5771c97
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mrbgems/mruby-struct/test/struct.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,13 @@
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

0 comments on commit 5771c97

Please sign in to comment.