Sieve with Ruby, tested with Rspec