summaryrefslogtreecommitdiff
path: root/spec/ruby/core/enumerator/product_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2023-09-04 16:07:46 +0200
committerBenoit Daloze <eregontp@gmail.com>2023-09-04 16:07:46 +0200
commit0b5c61494eb30c8c1867b9e6a52ad678e3f47901 (patch)
tree30ca3af5dadae196c39dae8c7e35c28b0537dd4a /spec/ruby/core/enumerator/product_spec.rb
parent3504f928dfb60b763e7b66149ca45cdbb45df78a (diff)
Update to ruby/spec@96d1072
Diffstat (limited to 'spec/ruby/core/enumerator/product_spec.rb')
-rw-r--r--spec/ruby/core/enumerator/product_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/ruby/core/enumerator/product_spec.rb b/spec/ruby/core/enumerator/product_spec.rb
index 44fc6441e1..0fb00fc7ee 100644
--- a/spec/ruby/core/enumerator/product_spec.rb
+++ b/spec/ruby/core/enumerator/product_spec.rb
@@ -44,6 +44,11 @@ ruby_version_is "3.2" do
elems.should == [[1, "X"], [1, "Y"], [2, "X"], [2, "Y"]]
end
+ it "returns nil when a block passed" do
+ Enumerator.product(1..2) {}.should == nil
+ end
+
+ # https://bugs.ruby-lang.org/issues/19829
it "reject keyword arguments" do
-> {
Enumerator.product(1..3, foo: 1, bar: 2)