Skip to content

Commit

Permalink
Use FrozenError instead of RuntimeError if FrozenError was declared
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jan 10, 2024
1 parent 6ae1421 commit ddc4b92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_rake_file_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,8 @@ def test_cloned_items_stay_frozen
a = FileList["a", "b", "c"]
a.freeze
c = a.clone
assert_raises(TypeError, RuntimeError) do
error_class = defined?(FrozenError) ? FrozenError : RuntimeError
assert_raises(error_class) do
c << "more"
end
end
Expand Down

0 comments on commit ddc4b92

Please sign in to comment.