Skip to content

Commit c2c0a01

Browse files
authored
Fix a test that uses invalid syntax (#1577)
Writing it like this on the same line was never valid. The expected html also contains the `end` from the class definition, which I think should not happen.
1 parent 95c5902 commit c2c0a01

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/rdoc/parser/ruby_test.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2847,12 +2847,13 @@ def blah()
28472847
def test_parse_instance_operation_method
28482848
util_parser <<-RUBY
28492849
class Foo
2850-
def self.& end
2850+
def self.&
2851+
end
28512852
end
28522853
RUBY
28532854

28542855
expected = <<EXPECTED
2855-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">&amp;</span> <span class="ruby-keyword">end</span>
2856+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">&amp;</span>
28562857
<span class="ruby-keyword">end</span>
28572858
EXPECTED
28582859
expected = expected.rstrip

0 commit comments

Comments
 (0)