Skip to content

Commit

Permalink
Memoize option parser
Browse files Browse the repository at this point in the history
So we can reuse it later without creating new instances.
  • Loading branch information
David Rodríguez committed May 12, 2016
1 parent 0629281 commit 184e74a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/byebug/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def interface
# Processes options passed from the command line.
#
def option_parser
OptionParser.new(banner, 25) do |opts|
@option_parser ||= OptionParser.new(banner, 25) do |opts|
opts.banner = banner

OptionSetter.new(self, opts).setup
Expand Down

0 comments on commit 184e74a

Please sign in to comment.