Question: I wrote this simple class

```
class FibSequence
    include Enumerable

    def initialize(num) 
        @sequence = fib(num)
    end

    def fib(n)
        vals = [1, 1]
        return [1] if n == 1
        return vals if n == 2

        (n-2).times do 
            vals.push(vals[-1] + vals[-2]) 
        end
        return vals
    end

    def each(&block)
        @sequence.each(&block)
    end

end

```

when I call it like this:

f = FibSequence.new(6) 

f.reject { |s| s.odd? } 

f.each { |s| print(s,':') }

I expect => [2, 8]
but I get => 1:1:2:3:5:8:

Answer: 
Ruby's [`reject`](http://ruby-doc.org/core-1.9.3/Enumerable.html#method-i-reject) method does return the result as new array. You thus have to write

```
f = f.reject { |s| s.odd? }

```

.
`reject` doesn't modify the original array, but returns a modified copy. In your code the second statement returns an array with the odd entries removed, but you are discarding it, and then calling `.each` on the original unmodified array. You would need to act on the modified array returned by `reject`:

```
f = FibSequence.new(6)
f.reject{|s| s.odd?}.each {|s| print(s,':')}

```

EDIT: Removed the option to use `reject!` as the question is based on an `Enumerable` not an `Array`.