Array.index a variable target

Hi,

Anybody know why index does not evaluate variables??

eg This does not work…

x = [1,2,3,4,5]
test = “2”
puts x.index(test)

Thanks,
Dave C., MD

Got it. String vs integer…