Skip to content

Commit 9103e70

Browse files
Make switch_option return a strict boolean
This is so that the `current_is_option?` method properly matches its own documentation, and consistently returns a pair of booleans.
1 parent b76f2c0 commit 9103e70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/thor/parser/options.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def current_is_value?
171171
end
172172

173173
def switch?(arg)
174-
switch_option(normalize_switch(arg))
174+
!switch_option(normalize_switch(arg)).nil?
175175
end
176176

177177
def switch_option(arg)

0 commit comments

Comments
 (0)