We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5abb2e6 commit 3337e5bCopy full SHA for 3337e5b
lib/rdoc/parser/ruby_tools.rb
@@ -20,7 +20,7 @@ def get_tk
20
21
if @tokens.empty? then
22
if @scanner_point >= @scanner.size
23
- return nil
+ return
24
else
25
tk = @scanner[@scanner_point]
26
@scanner_point += 1
@@ -31,16 +31,14 @@ def get_tk
31
tk = @tokens.shift
32
end
33
34
- if tk == nil || :on___end__ == tk[:kind]
35
- tk = nil
+ if tk.nil? || :on___end__ == tk[:kind]
36
37
38
- return nil unless tk
39
-
40
# inform any listeners of our shiny new token
41
- @token_listeners.each do |obj|
+ @token_listeners&.each do |obj|
42
obj.add_token(tk)
43
- end if @token_listeners
+ end
44
45
tk
46
0 commit comments