File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
- require "set"
2
1
require_relative "thor/base"
3
2
4
3
class Thor
@@ -324,7 +323,7 @@ def check_unknown_options?(config) #:nodoc:
324
323
# ==== Parameters
325
324
# Symbol ...:: A list of commands that should be affected.
326
325
def stop_on_unknown_option! ( *command_names )
327
- stop_on_unknown_option . merge ( command_names )
326
+ @ stop_on_unknown_option = stop_on_unknown_option | command_names
328
327
end
329
328
330
329
def stop_on_unknown_option? ( command ) #:nodoc:
@@ -338,7 +337,7 @@ def stop_on_unknown_option?(command) #:nodoc:
338
337
# ==== Parameters
339
338
# Symbol ...:: A list of commands that should be affected.
340
339
def disable_required_check! ( *command_names )
341
- disable_required_check . merge ( command_names )
340
+ @ disable_required_check = disable_required_check | command_names
342
341
end
343
342
344
343
def disable_required_check? ( command ) #:nodoc:
@@ -348,12 +347,12 @@ def disable_required_check?(command) #:nodoc:
348
347
protected
349
348
350
349
def stop_on_unknown_option #:nodoc:
351
- @stop_on_unknown_option ||= Set . new
350
+ @stop_on_unknown_option ||= [ ]
352
351
end
353
352
354
353
# help command has the required check disabled by default.
355
354
def disable_required_check #:nodoc:
356
- @disable_required_check ||= Set . new ( [ :help ] )
355
+ @disable_required_check ||= [ :help ]
357
356
end
358
357
359
358
# The method responsible for dispatching given the args.
You can’t perform that action at this time.
0 commit comments