Skip to content

Commit c954969

Browse files
makenowjustAry Borenszweig
authored and
Ary Borenszweig
committedNov 24, 2016
Avoid TODO
We have Crystal v0.20.0 now ;)
1 parent 446dffa commit c954969

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed
 

Diff for: ‎src/option_parser.cr

+4-7
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,15 @@ class OptionParser
5959
protected property flags : Array(String)
6060
protected property handlers : Array(Handler)
6161
protected property unknown_args
62-
protected property! missing_option
63-
protected property! invalid_option
62+
protected property missing_option
63+
protected property invalid_option
6464

6565
# Creates a new parser.
6666
def initialize
6767
@flags = [] of String
6868
@handlers = [] of Handler
69-
missing_option { |flag| raise MissingOption.new(flag) }
70-
invalid_option { |flag| raise InvalidOption.new(flag) }
71-
# TODO: switch to these and change property! to property above after 0.19.0
72-
# @missing_option = ->(option : String) { raise MissingOption.new(option) }
73-
# @invalid_option = ->(option : String) { raise InvalidOption.new(option) }
69+
@missing_option = ->(option : String) { raise MissingOption.new(option) }
70+
@invalid_option = ->(option : String) { raise InvalidOption.new(option) }
7471
end
7572

7673
# Creates a new parser, with its configuration specified in the block.

0 commit comments

Comments
 (0)
Please sign in to comment.