tresse 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/lib/tresse.rb +6 -6
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05e09726eedc898eea170f57db54ee5ae1bf6e1f
4
- data.tar.gz: 19c6a4a5a4a291d721b79b1882d433464a8d6d1a
3
+ metadata.gz: 4cbe8d134d391a575fb9e6678088eada6153a647
4
+ data.tar.gz: 4789741771b4071ea4e68d1e4180745e3cf9555f
5
5
  SHA512:
6
- metadata.gz: 2866f086334761f86908eb0a0022c85ff4082081c261994acfab914a8df7b29f1a2693d6e775f40e21bfa3a6b8a60f6ae44f524110603ceeb0657af1928331a9
7
- data.tar.gz: 02b4ef1b7aec9eb6897ef691db0196388c69d0768cbfb79f05473a566b03bedb327c75071ea259ab03328d3561cbceaaf584ec57a59b465f126ca4aef4788587
6
+ metadata.gz: 1dcd1a054d0657d58a0366bf92a103425a5c079adfd13184897e91ed6fdcc5d138378dc56fa4415cba723a41c3c9b75ef79a129be98068d017a5d4e03b28640e
7
+ data.tar.gz: bfcfce0ab29d7e477a27225847a2a3a63ff3aa8263ef5ae11c41b9bc9a9e1126d62c778d123fcfccfa7e46dc005629920bb3f26eac82ec8664e6233dda4d725d
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
  # CHANGELOG.md
3
3
 
4
4
 
5
+ ## tresse 1.1.1 released 2019-09-17
6
+
7
+ * Refine Tresse::Group#source_each
8
+
9
+
5
10
  ## tresse 1.1.0 released 2019-09-17
6
11
 
7
12
  * Introduce Tresse::Group#source_each(collection, &block)
data/lib/tresse.rb CHANGED
@@ -4,7 +4,7 @@ require 'thread'
4
4
 
5
5
  module Tresse
6
6
 
7
- VERSION = '1.1.0'
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.method(:call).arity.abs])
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?(Array)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tresse
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mettraux