diff options
Diffstat (limited to 'spec/ruby/core/enumerator/lazy/uniq_spec.rb')
-rw-r--r-- | spec/ruby/core/enumerator/lazy/uniq_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/core/enumerator/lazy/uniq_spec.rb b/spec/ruby/core/enumerator/lazy/uniq_spec.rb index fea2bec637..d337d063d6 100644 --- a/spec/ruby/core/enumerator/lazy/uniq_spec.rb +++ b/spec/ruby/core/enumerator/lazy/uniq_spec.rb @@ -72,5 +72,11 @@ ruby_version_is '2.4' do @lazy.uniq { |_, label| label.downcase }.force.should == [[0, 'foo'], [2, 'bar']] end end + + it "works with an infinite enumerable" do + s = 0..Float::INFINITY + s.lazy.uniq.first(100).should == + s.first(100).uniq + end end end |