Skip to content

Commit a353417

Browse files
committed
Fix test_rational_imaginary_tokenize for confusable with a-ary
1 parent d4cb320 commit a353417

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/test_rdoc_ruby_lex.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ def test_unary_minus
486486
end
487487

488488
def test_rational_imaginary_tokenize
489-
tokens = RDoc::RubyLex.tokenize '1.11r + 2.34i + 5.55ri', nil
489+
tokens = RDoc::RubyLex.tokenize '1.11r + 2.34i + 5.55ri + 0i', nil
490490

491491
expected = [
492492
@TK::TkRATIONAL .new( 0, 1, 0, '1.11r'),
@@ -498,7 +498,11 @@ def test_rational_imaginary_tokenize
498498
@TK::TkPLUS .new(14, 1, 14, '+'),
499499
@TK::TkSPACE .new(15, 1, 15, ' '),
500500
@TK::TkIMAGINARY.new(16, 1, 16, '5.55ri'),
501-
@TK::TkNL .new(22, 1, 22, "\n"),
501+
@TK::TkSPACE .new(22, 1, 22, ' '),
502+
@TK::TkPLUS .new(23, 1, 23, '+'),
503+
@TK::TkSPACE .new(24, 1, 24, ' '),
504+
@TK::TkIMAGINARY.new(25, 1, 25, '0i'),
505+
@TK::TkNL .new(27, 1, 27, "\n"),
502506
]
503507

504508
assert_equal expected, tokens

0 commit comments

Comments
 (0)