rubinius/rubinius — pull request #2063 by kachick (2012-11-29 17:37:52+00:00)
Title: Array#index, Array#find_index returns Enumerator

I have tried to fix this behavior.

---

MRI - ruby 1.8.7 (2012-10-12 patchlevel 371) [x86_64-linux])

```ruby
[:a, :b].index #=> #
```

Rubinius - rubinius 2.0.0rc1 (1.8.7 5312a9b0 2012-11-02 JI) [x86_64-unknown-linux-gnu]

```ruby
[:a, :b].index #=> LocalJumpError: no block given
```

---

And faced below different behaviors, i can't decide/fixed it.
What approach is right?

MRI - ruby 1.8.7 (2012-10-12 patchlevel 371) [x86_64-linux])

```ruby
enum = [:a, :b].index
enum.next #=> :a
enum.next #=> StopIteration: iteration reached at end
```

ruby 1.9.3p332 (2012-11-15) [x86_64-linux]
Rubinius - X18 (After these commits)
Rubinius - X19 (After these commits)

```ruby
enum = [:a, :b].index
enum.next #=> :a
enum.next #=> :b
enum.next #=> StopIteration: iteration reached at end
```