How can I implement this in Ruby? Is there any one line of code technique? Let\'s say I want to get rid of all the elements which are less than 3 of an integer array.
Probably worth pointing out that
array.reject! {|x| x < 3}
and
array.delete_if {|x| x < 3}
Are the same, but
array.reject {|x| x < 3}
Will still return the same result, but not change the "array".