Skip to content

Commit f9c8266

Browse files
authored
Merge pull request #554 from aycabta/remove-old-token-name
Remove old token name
2 parents 2f1bbb2 + ea03910 commit f9c8266

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

lib/rdoc/parser/ruby.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,7 @@ def error(msg)
318318
end
319319

320320
##
321-
# Looks for a true or false token. Returns false if TkFALSE or TkNIL are
322-
# found.
321+
# Looks for a true or false token.
323322

324323
def get_bool
325324
skip_tkspace
@@ -1461,8 +1460,7 @@ def parse_method_name_singleton container, name_t # :nodoc:
14611460
name_t2 = get_tk
14621461

14631462
if (:on_kw == name_t[:kind] && 'self' == name_t[:text]) || (:on_op == name_t[:kind] && '%' == name_t[:text]) then
1464-
# NOTE: work around '[' being consumed early and not being re-tokenized
1465-
# as a TkAREF
1463+
# NOTE: work around '[' being consumed early
14661464
if :on_lbracket == name_t2[:kind]
14671465
get_tk
14681466
name = '[]'

test/test_rdoc_parser_ruby.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2826,7 +2826,7 @@ def test_parse_statements_identifier_yields
28262826
assert_nil m.params, 'Module parameter not removed'
28272827
end
28282828

2829-
def test_parse_statements_stopdoc_TkALIAS
2829+
def test_parse_statements_stopdoc_alias
28302830
klass = @top_level.add_class RDoc::NormalClass, 'Foo'
28312831

28322832
util_parser "\n# :stopdoc:\nalias old new"
@@ -2837,7 +2837,7 @@ def test_parse_statements_stopdoc_TkALIAS
28372837
assert_empty klass.unmatched_alias_lists
28382838
end
28392839

2840-
def test_parse_statements_stopdoc_TkIDENTIFIER_alias_method
2840+
def test_parse_statements_stopdoc_identifier_alias_method
28412841
klass = @top_level.add_class RDoc::NormalClass, 'Foo'
28422842

28432843
util_parser "\n# :stopdoc:\nalias_method :old :new"
@@ -2848,7 +2848,7 @@ def test_parse_statements_stopdoc_TkIDENTIFIER_alias_method
28482848
assert_empty klass.unmatched_alias_lists
28492849
end
28502850

2851-
def test_parse_statements_stopdoc_TkIDENTIFIER_metaprogrammed
2851+
def test_parse_statements_stopdoc_identifier_metaprogrammed
28522852
klass = @top_level.add_class RDoc::NormalClass, 'Foo'
28532853

28542854
util_parser "\n# :stopdoc:\n# attr :meta"
@@ -2859,7 +2859,7 @@ def test_parse_statements_stopdoc_TkIDENTIFIER_metaprogrammed
28592859
assert_empty klass.attributes
28602860
end
28612861

2862-
def test_parse_statements_stopdoc_TkCONSTANT
2862+
def test_parse_statements_stopdoc_constant
28632863
klass = @top_level.add_class RDoc::NormalClass, 'Foo'
28642864

28652865
util_parser "\n# :stopdoc:\nA = v"
@@ -2869,7 +2869,7 @@ def test_parse_statements_stopdoc_TkCONSTANT
28692869
assert_empty klass.constants
28702870
end
28712871

2872-
def test_parse_statements_stopdoc_TkDEF
2872+
def test_parse_statements_stopdoc_def
28732873
klass = @top_level.add_class RDoc::NormalClass, 'Foo'
28742874

28752875
util_parser "\n# :stopdoc:\ndef m\n end"

0 commit comments

Comments
 (0)