mirror of
https://github.com/inspec/inspec
synced 2024-11-14 17:07:09 +00:00
prevent nil.include?
This commit is contained in:
parent
4152101679
commit
6a9f015527
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ module Inspec
|
|||
if @qualifier.length > 1
|
||||
last = @qualifier[-1]
|
||||
# preventing its('to_i') as the value returned is always 0
|
||||
if last.length == 1 && last[0] !~ /^to_.$/ && !last[0].include?('[')
|
||||
if last.length == 1 && last[0] !~ /^to_.$/ && !last[0].nil? && !last[0].include?('[')
|
||||
xres = last[0]
|
||||
else
|
||||
res += '.' + ruby_qualifier(last)
|
||||
|
|
Loading…
Reference in a new issue