From cc0dc67bbbe1951ff90004bc987f78545625d772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Fri, 7 May 2021 12:49:32 +0900 Subject: cdhash_cmp: can also take complex There are complex literals `123i`, which can also be a case condition. --- test/ruby/test_rational.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb index 5262b6edad..27d0527d42 100644 --- a/test/ruby/test_rational.rb +++ b/test/ruby/test_rational.rb @@ -839,6 +839,10 @@ class Rational_Test < Test::Unit::TestCase n = case 3/2r when 1.5r then true else false end assert_equal(n, true, '[ruby-core:103759] [Bug #17854]') RUBY + assert_separately([], <<-RUBY) + n = case 1i when 1i then true else false end + assert_equal(n, true, '[ruby-core:103759] [Bug #17854]') + RUBY end def test_Rational_with_invalid_exception -- cgit v1.2.3