Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 committed Aug 13, 2023
1 parent 215ad48 commit d507e16
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/irb/ruby-lex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ class Statement

def initialize(line, is_assignment, command, arg, command_class)
@line = line
@command = command
@is_assignment = is_assignment
@command = command
@arg = arg
@command_class = command_class
end
Expand All @@ -239,8 +239,10 @@ def should_be_handled_by_debugger?
end

def evaluable_line
return @line unless @command_class

# Hook command-specific transformation
if @command_class&.respond_to?(:transform_args)
if @command_class.respond_to?(:transform_args)
arg = @command_class.transform_args(@arg)
else
arg = @arg
Expand Down

0 comments on commit d507e16

Please sign in to comment.