Permalink
Browse files

Updated an @example.

  • Loading branch information...
1 parent e52f93d commit 379bc00dcd92a1a377d4789b213fe9b1a02ca913 @postmodern committed Oct 15, 2011
Showing with 4 additions and 4 deletions.
  1. +3 −3 lib/combinatorics/cartesian_product/mixin.rb
  2. +1 −1 spec/cartesian_product/mixin_examples.rb
View
6 lib/combinatorics/cartesian_product/mixin.rb
@@ -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
#
View
2 spec/cartesian_product/mixin_examples.rb
@@ -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

0 comments on commit 379bc00

Please sign in to comment.