Undefined method `filter' for array

So I am trying to solve a class problem/homework on repl.it, in ruby, and this is the error listing I'm given. ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux] undefined method `filter' ...