From 8212dfcf14c63c006b9e1c37595f3d62eab052cf Mon Sep 17 00:00:00 2001 From: "Mark J. Titorenko" Date: Thu, 29 Nov 2018 18:36:20 +0000 Subject: Do nothing when the same block is included again. If the same block is included multiple times, we no longer raise an exception or overwrite the included block instance variable. Fixes #14802. [Mark J. Titorenko + Vlad Bokov] --- activesupport/test/concern_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activesupport/test/concern_test.rb') diff --git a/activesupport/test/concern_test.rb b/activesupport/test/concern_test.rb index 98d8f3ee0d..4b3cfcd1d2 100644 --- a/activesupport/test/concern_test.rb +++ b/activesupport/test/concern_test.rb @@ -128,4 +128,12 @@ class ConcernTest < ActiveSupport::TestCase end end end + + def test_no_raise_on_same_included_call + assert_nothing_raised do + 2.times do + load File.expand_path("../fixtures/concern/some_concern.rb", __FILE__) + end + end + end end -- cgit v1.2.3