aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/security/cve_2011_4815_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/security/cve_2011_4815_spec.rb')
-rw-r--r--spec/ruby/security/cve_2011_4815_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/ruby/security/cve_2011_4815_spec.rb b/spec/ruby/security/cve_2011_4815_spec.rb
index 0a353b742a..74f0054850 100644
--- a/spec/ruby/security/cve_2011_4815_spec.rb
+++ b/spec/ruby/security/cve_2011_4815_spec.rb
@@ -22,6 +22,17 @@ describe "Float#hash" do
it_behaves_like :resists_cve_2011_4815, '3.14'
end
+# https://bugs.ruby-lang.org/issues/14420
+guard_not -> { platform_is :windows and PlatformGuard.implementation?(:ruby) } do
+ describe "Rational#hash" do
+ it_behaves_like :resists_cve_2011_4815, 'Rational(1, 2)'
+ end
+
+ describe "Complex#hash" do
+ it_behaves_like :resists_cve_2011_4815, 'Complex(1, 2)'
+ end
+end
+
describe "String#hash" do
it_behaves_like :resists_cve_2011_4815, '"abc"'
end