array_zip_with 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/array_zip_with/core_ext/array.rb +3 -3
- data/lib/array_zip_with/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11d341d3d32e3f99a85ad77348f694f490115614
|
4
|
+
data.tar.gz: 2722456dae077b3ddb7e8d411dc99daa0a3968a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2032acef75614f0cf665bedc0f8dd68c3325995802bdbb5afad222e8732b549ad0b726152e6c4b8153f5c8b3799a3167a40d1128bc087af74b2917ea9abf0e4
|
7
|
+
data.tar.gz: c1fdb64cac4ddbdec0671e8dc3f4805f2f85c0e87c239d9fd374fbfc37cde3ecbdfeb9a984606ba22158aed6c7117e221a5b55292f006706714ef04b1b2e56c3
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# @author Vasanth Balakrishnan <vasantheb@gmail.com>
|
2
2
|
class Array
|
3
3
|
# @overload zip_with(*args, &block)
|
4
|
-
# Zips the input arrays with `self` and invokes block with the elements
|
5
|
-
# the zipped array.
|
4
|
+
# Zips the input arrays with `self` and invokes block with the elements
|
5
|
+
# of the zipped array.
|
6
6
|
# @param [Array] args One or more arrays
|
7
7
|
# @example With one input array
|
8
8
|
# a = [1, 2, 3]
|
@@ -26,7 +26,7 @@ class Array
|
|
26
26
|
# a.zip_with([4, 5, 6], [7, 8, 9], :+) # => [12, 15, 18]
|
27
27
|
# @return [Array]
|
28
28
|
# @raise [ArgumentError] If there is no symbol or a block as the last
|
29
|
-
#
|
29
|
+
# parameter.
|
30
30
|
def zip_with(*args)
|
31
31
|
return zip(*args).map(&Proc.new) if block_given?
|
32
32
|
operator = args.pop
|