Skip to content

Commit

Permalink
Merge pull request #346 from mvz/fix-unref-spec
Browse files Browse the repository at this point in the history
Avoid potentially accessing data after deallocation in unref spec
  • Loading branch information
mvz authored Aug 14, 2023
2 parents d3f4830 + 9a6fa59 commit 64eac8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/integration/generated_regress_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1453,9 +1453,10 @@ def make_derived_instance
end

it "has a working method #unref" do
_(base_struct[:refcount]).must_equal 1
derived_instance.ref
_(base_struct[:refcount]).must_equal 2
derived_instance.unref
_(base_struct[:refcount]).must_equal 0
_(base_struct[:refcount]).must_equal 1
end
end

Expand Down

0 comments on commit 64eac8c

Please sign in to comment.