I get a very strange error message when I try to iterate over an array of objects. Mistake
NoMethodError (undefined method `+@' for []:Array):
Here is the code for this loop.
items.each do |itemsi|
bestoffer = -1
matchescounter++
offers.each do |offs|
if itemsi.togive.to_str == offs.totake.to_str
if offs.togive.to_int > bestoffer
bestoffer = offs.togive.to_int
matches[matchescounter].store(itemi, offer)
end
end
end
end
I don't have + @ anywhere in my code. Weird
source
share