summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorst0012 <stan001212@gmail.com>2022-09-30 23:14:10 +0100
committergit <svn-admin@ruby-lang.org>2022-10-03 04:59:50 +0900
commit42fcbcc2150c7eaa2057a159ede35a3ac046ea31 (patch)
treee5a107ce41f309bc6bd95d460c7b960c9e013f0c /lib
parent55e2116f2c47db6c4e3323b7b89f0088efbb46ad (diff)
downloadruby-42fcbcc2150c7eaa2057a159ede35a3ac046ea31.tar.gz
[ruby/irb] Remove unnecessary condition
https://github.com/ruby/irb/commit/daffb8bfe5
Diffstat (limited to 'lib')
-rw-r--r--lib/irb/ruby-lex.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb
index 77e7842469..3cb09fff55 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -203,12 +203,7 @@ class RubyLex
last_line = lines[line_index]&.byteslice(0, byte_pointer)
code += last_line if last_line
@tokens = self.class.ripper_lex_without_warning(code, context: context)
- corresponding_token_depth = check_corresponding_token_depth(lines, line_index)
- if corresponding_token_depth
- corresponding_token_depth
- else
- nil
- end
+ check_corresponding_token_depth(lines, line_index)
end
end
end