forked from jruby/jruby
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass the correct arity to #each in Enumerable#find_index.
- Loading branch information
1 parent
34f2288
commit b38990d
Showing
2 changed files
with
9 additions
and
2 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
spec/regression/gh-525_enumetor_find_index_block_arity_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require 'rspec' | ||
|
||
describe 'Enumerator#find_index' do | ||
it 'should pass the correct number of arguments to the block' do | ||
Enumerator.new { |y| y.yield :success }.find_index { |e| e == :success }.should == 0 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters