summaryrefslogtreecommitdiff
path: root/spec/ruby/core/enumerator/lazy/drop_while_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/enumerator/lazy/drop_while_spec.rb')
-rw-r--r--spec/ruby/core/enumerator/lazy/drop_while_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/core/enumerator/lazy/drop_while_spec.rb b/spec/ruby/core/enumerator/lazy/drop_while_spec.rb
index e29026be09..6f6472e393 100644
--- a/spec/ruby/core/enumerator/lazy/drop_while_spec.rb
+++ b/spec/ruby/core/enumerator/lazy/drop_while_spec.rb
@@ -57,4 +57,10 @@ describe "Enumerator::Lazy#drop_while" do
end
end
end
+
+ it "works with an infinite enumerable" do
+ s = 0..Float::INFINITY
+ s.lazy.drop_while { |n| n < 100 }.first(100).should ==
+ s.first(200).drop_while { |n| n < 100 }
+ end
end