Skip to content

Commit

Permalink
Updated an @example.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Oct 15, 2011
1 parent e52f93d commit 379bc00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/combinatorics/cartesian_product/mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ module Mixin
# [1, 2].cartprod([3, 4])
# # => [[1, 3], [2, 3], [1, 4], [2, 4]]
#
# @example Cartesian product over an Array of string Array's
# ['a'].cartprod([['b'], ['c'], ['d']]).to_a
# # => [["a", "b", "c", "d"]]
# @example Cartesian product over an Array of Strings
# ['a'].cartprod(['b', 'c', 'd']).to_a
# # => [["a", "b"], ["a", "c"], ["a", "d"]]
#
# @example Three-way Cartesian product operation
#
Expand Down
2 changes: 1 addition & 1 deletion spec/cartesian_product/mixin_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
]
end

it "the cartprod of ['a'].cartprod([['b'], ['c'], ['d']]) should be [['a', 'b', 'c', 'd']]" do
it "the cartprod of ['a'].cartprod(['b', 'c', 'd']) should be [['a', 'b'], ['a', 'c'], ['a', 'd']]" do
set1 = subject['a']
set2 = subject['b', 'c', 'd']
results = set1.cartprod(set2).to_a
Expand Down

0 comments on commit 379bc00

Please sign in to comment.