Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add guard to Watir.index_base ensure it is zero or one.

  • Loading branch information...
commit 4d929bb787e7916c0d543637c478b5991bfdefc3 1 parent a9bcdec
@bret bret authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  commonwatir/lib/watir/index_base.rb
View
1  commonwatir/lib/watir/index_base.rb
@@ -6,6 +6,7 @@ def index_base
end
# Set the origin for :index. Values 0 or 1 are supported.
def index_base= integer
+ raise ArgumentError, 'index_base must be 0 or 1' unless [0, 1].include? integer
@@index_base = integer
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.