Skip to content

Commit f4d6eeb

Browse files
committed
Avoid to warning for variable initialization
1 parent a27bb8e commit f4d6eeb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/rake/application.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,7 @@ def add_loader(ext, loader)
165165

166166
# Application options from the command line
167167
def options
168-
return @options if @options
169-
170-
@options = Struct.new(
168+
@options ||= Struct.new(
171169
:always_multitask, :backtrace, :build_all, :dryrun,
172170
:ignore_deprecate, :ignore_system, :job_stats, :load_system,
173171
:nosearch, :rakelib, :show_all_tasks, :show_prereqs,

0 commit comments

Comments
 (0)