mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 20:44:00 +02:00
cdhash_cmp: can also take complex
There are complex literals `123i`, which can also be a case condition.
This commit is contained in:
parent
d0e6c6e682
commit
cc0dc67bbb
Notes:
git
2021-05-12 10:31:14 +09:00
4 changed files with 25 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue