找到两个数组中的所有id号

时间:2017-06-06 00:57:12

标签: ruby

我试图使用InputStream stream = Texture.class.getResourceAsStream(path); _img = ImageIO.read(stream); 比较在两个数组中找到相同ID的所有时间。当我输出数组时,您可以看到有匹配项,但是当我尝试运行它们时,它会抛出错误&

no implicit conversion of nil into Array

为什么这不起作用?提前谢谢!

1 个答案:

答案 0 :(得分:3)

它表示比较中的第二个元素@fluent_user_idsnil。这是正确的,因为您的数组名为@fluent_users_ids。所以它只是一个错字,我们都去过那里!