lib/byebug/commands/history.rb in byebug-6.0.2 vs lib/byebug/commands/history.rb in byebug-7.0.0
- old
+ new
@@ -14,11 +14,11 @@
/^\s* hist(?:ory)? (?:\s+(?<num_cmds>.+))? \s*$/x
end
def self.description
<<-EOD
- hist[ory] [num_cmds]
+ hist[ory][ num_cmds]
#{short_description}
EOD
end
@@ -27,13 +27,10 @@
end
def execute
history = processor.interface.history
- if @match[:num_cmds]
- size, err = get_int(@match[:num_cmds], 'history', 1, history.size)
- return errmsg(err) unless size
- end
+ size, = get_int(@match[:num_cmds], 'history', 1) if @match[:num_cmds]
puts history.to_s(size)
end
end
end