Fix max multiplicity count parsing
This commit is contained in:
1 parent
449eec4982
commit
611ebeeddd
1 file changed
+3
-4
@@ -177,14 +177,13 @@ module Imbecile
|
|||||||
min_count = min_count.to_i
|
min_count = min_count.to_i
|
||||||
if comma.to_s == ""
|
if comma.to_s == ""
|
||||||
max_count = min_count
|
max_count = min_count
|
||||||
else
|
elsif max_count.to_s != ""
|
||||||
max_count = nil
|
|
||||||
end
|
|
||||||
if max_count.to_s != ""
|
|
||||||
max_count = max_count.to_i
|
max_count = max_count.to_i
|
||||||
if max_count < min_count
|
if max_count < min_count
|
||||||
raise Error.new("Maximum repetition count cannot be less than minimum repetition count")
|
raise Error.new("Maximum repetition count cannot be less than minimum repetition count")
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
max_count = nil
|
||||||
end
|
end
|
||||||
@pattern = pattern
|
@pattern = pattern
|
||||||
[min_count, max_count]
|
[min_count, max_count]
|
||||||
|
|||||||
Reference in new issue
Block a user