Hello everyone. First of all, sorry for my english.
I would like to compare the content between two arrays.
To make it easier to understand what I want, I will type an example.
I am using two arrays.
The first one contains [1,2,3] and is a kind of constant, it remains the
The second one is variabe and keeps changing. It may be, for example,
What I want to do is to compare the two arrays in order to check if the
second array contains the content of the first array, ordered in the
As you can see, my second array contains 1,2,3, but what method can I
use to check if the second array contains the same numbers as the first
array with the same order.
To make it easier I would like to check if the array [4,8,9,1,2,3,5]
contains the array [1,2,3], but the array.include?([1,2,3]) command
seems not to work.
Thanks for your help.