Skip to content

Commit 24e8de2

Browse files
authored
Merge pull request #545 from ruby/remove-ostrust-dependency
Use Struct instead of OpenStruct.
2 parents 15e936c + f4d6eeb commit 24e8de2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/rake.rb

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ module Rake; end
3030
require "singleton"
3131
require "monitor"
3232
require "optparse"
33-
require "ostruct"
3433

3534
require "rake/ext/string"
3635

lib/rake/application.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,13 @@ def add_loader(ext, loader)
165165

166166
# Application options from the command line
167167
def options
168-
@options ||= OpenStruct.new
168+
@options ||= Struct.new(
169+
:always_multitask, :backtrace, :build_all, :dryrun,
170+
:ignore_deprecate, :ignore_system, :job_stats, :load_system,
171+
:nosearch, :rakelib, :show_all_tasks, :show_prereqs,
172+
:show_task_pattern, :show_tasks, :silent, :suppress_backtrace_pattern,
173+
:thread_pool_size, :trace, :trace_output, :trace_rules
174+
).new
169175
end
170176

171177
# Return the thread pool used for multithreaded processing.

0 commit comments

Comments
 (0)