summaryrefslogtreecommitdiff
path: root/tool/lib/core_assertions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/lib/core_assertions.rb')
-rw-r--r--tool/lib/core_assertions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb
index e9c586f910..723a1742c5 100644
--- a/tool/lib/core_assertions.rb
+++ b/tool/lib/core_assertions.rb
@@ -592,14 +592,14 @@ eom
def assert_deprecated_warning(mesg = /deprecated/)
assert_warning(mesg) do
- Warning[:deprecated] = true
+ Warning[:deprecated] = true if Warning.respond_to?(:[]=)
yield
end
end
def assert_deprecated_warn(mesg = /deprecated/)
assert_warn(mesg) do
- Warning[:deprecated] = true
+ Warning[:deprecated] = true if Warning.respond_to?(:[]=)
yield
end
end