tresse 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/tresse.rb +6 -6
- 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: 4cbe8d134d391a575fb9e6678088eada6153a647
|
4
|
+
data.tar.gz: 4789741771b4071ea4e68d1e4180745e3cf9555f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1dcd1a054d0657d58a0366bf92a103425a5c079adfd13184897e91ed6fdcc5d138378dc56fa4415cba723a41c3c9b75ef79a129be98068d017a5d4e03b28640e
|
7
|
+
data.tar.gz: bfcfce0ab29d7e477a27225847a2a3a63ff3aa8263ef5ae11c41b9bc9a9e1126d62c778d123fcfccfa7e46dc005629920bb3f26eac82ec8664e6233dda4d725d
|
data/CHANGELOG.md
CHANGED
data/lib/tresse.rb
CHANGED
@@ -4,7 +4,7 @@ require 'thread'
|
|
4
4
|
|
5
5
|
module Tresse
|
6
6
|
|
7
|
-
VERSION = '1.1.
|
7
|
+
VERSION = '1.1.1'
|
8
8
|
|
9
9
|
class << self
|
10
10
|
|
@@ -85,7 +85,7 @@ module Tresse
|
|
85
85
|
|
86
86
|
def self.call_block(block, args)
|
87
87
|
|
88
|
-
block.call(*args[0, block.
|
88
|
+
block.call(*args[0, block.arity.abs])
|
89
89
|
end
|
90
90
|
|
91
91
|
|
@@ -155,12 +155,12 @@ module Tresse
|
|
155
155
|
|
156
156
|
def source_each(collection, &block)
|
157
157
|
|
158
|
-
if collection.is_a?(
|
159
|
-
collection.each_with_index { |e, i|
|
160
|
-
source { Tresse.call_block(block, [ e, i ]) } }
|
161
|
-
else
|
158
|
+
if collection.is_a?(Hash)
|
162
159
|
collection.each { |k, v|
|
163
160
|
source { Tresse.call_block(block, [ k, v ]) } }
|
161
|
+
else
|
162
|
+
collection.each_with_index { |e, i|
|
163
|
+
source { Tresse.call_block(block, [ e, i ]) } }
|
164
164
|
end
|
165
165
|
|
166
166
|
self
|