File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ def insync?(is)
7373 # in string form to actual integers, and returns the value if it's
7474 # an integer or false if it's just a normal string.
7575 def numfix ( num )
76- if num =~ %r{^\d +$} || num . is_a? ( Integer )
76+ if num . is_a? ( Integer ) || num =~ %r{^\d +$}
7777 num
7878 else
7979 false
@@ -155,17 +155,17 @@ def should=(ary)
155155 end
156156
157157 # Allow step syntax
158- if value =~ %r{^\* /[0-9]+$}
158+ if value . to_s =~ %r{^\* /[0-9]+$}
159159 return value
160160 end
161161
162162 # Allow ranges
163- if value =~ %r{^[0-9]+-[0-9]+$}
163+ if value . to_s =~ %r{^[0-9]+-[0-9]+$}
164164 return value
165165 end
166166
167167 # Allow ranges with step
168- if value =~ %r{^[0-9]+-[0-9]+/[0-9]+$}
168+ if value . to_s =~ %r{^[0-9]+-[0-9]+/[0-9]+$}
169169 return value
170170 end
171171
You can’t perform that action at this time.
0 commit comments