From 42fcbcc2150c7eaa2057a159ede35a3ac046ea31 Mon Sep 17 00:00:00 2001 From: st0012 Date: Fri, 30 Sep 2022 23:14:10 +0100 Subject: [PATCH] [ruby/irb] Remove unnecessary condition https://github.com/ruby/irb/commit/daffb8bfe5 --- lib/irb/ruby-lex.rb | 7 +------ 1 file changed, 1 insertion(+), 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