diff --git a/lib/rake.rb b/lib/rake.rb index 0dfd05315..0f3d6a330 100644 --- a/lib/rake.rb +++ b/lib/rake.rb @@ -30,7 +30,6 @@ module Rake; end require "singleton" require "monitor" require "optparse" -require "ostruct" require "rake/ext/string" diff --git a/lib/rake/application.rb b/lib/rake/application.rb index ac5714b11..fe4e1c0bc 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -165,7 +165,22 @@ def add_loader(ext, loader) # Application options from the command line def options - @options ||= OpenStruct.new + return @options if @options + + option = Struct.new( + :always_multitask, :backtrace, :build_all, :dryrun, + :ignore_deprecate, :ignore_system, :job_stats, :load_system, + :nosearch, :rakelib, :show_all_tasks, :show_prereqs, + :show_task_pattern, :show_tasks, :silent, :suppress_backtrace_pattern, + :thread_pool_size, :trace, :trace_output, :trace_rules + ) + @options = option.new( + false, false, false, false, + false, false, false, false, + false, %w[rakelib], false, false, + nil, nil, false, nil, + Rake.suggested_thread_count, false, $stderr, false + ) end # Return the thread pool used for multithreaded processing.