self_enumerable 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b69d1e85f92b518c2c93e8542f627f88e08a628
4
- data.tar.gz: f204806b3600cf93306bb3d49fe538e5dd14359e
3
+ metadata.gz: a1491da02acde05a9accd72a89fa2cc8a69f1ebb
4
+ data.tar.gz: c856dacc8e6eb6bc527dbe472b24d8909dca85b7
5
5
  SHA512:
6
- metadata.gz: c935152429fc1b265254e453a1e0e9e748c1d31ed9dd26d80444bb5a52b201a69753c1d98a1017ce4548519cae0875a2969144471f51e903092d649304a3a626
7
- data.tar.gz: e519d3c72be0eb4a50aaa82fa6372b527d330cd9ad6eb4c8bfd3242d7292699e74bbcbdf15482785224065b5251f393e00939c820be84b174404c67e74d75682
6
+ metadata.gz: 999057fe28b5a195b365dd192316c972bc5894407b6688b55cfa3610964fbf855c80494f27905de6b0d8961c666990ba33bcf69d6fc3671759b571103fb0b919
7
+ data.tar.gz: 4083d8209cb005f96a68f9b00c3c6e7e3f88f54514d23ba1e3e5767c76e84320281cd2c9e2b8431eeff4fe5e417991a232960b449cb36ddf340cb40870e8bf1c
@@ -37,12 +37,12 @@ class BenchmarkSelfEnumerable
37
37
  Benchmark.ips do |x|
38
38
  callable = -> (_el) { _el }
39
39
 
40
- x.report("Enumerable#map") do
41
- enumerable_data_set.map(&callable)
40
+ x.report("Enumerable#select") do
41
+ enumerable_data_set.select(&callable)
42
42
  end
43
43
 
44
- x.report("SelfEnumerable#map") do
45
- self_enumerable_data_set.map(&callable)
44
+ x.report("SelfEnumerable#select") do
45
+ self_enumerable_data_set.select(&callable)
46
46
  end
47
47
 
48
48
  x.compare!
@@ -2,10 +2,10 @@ require "self_enumerable/version"
2
2
 
3
3
  module SelfEnumerable
4
4
  WRAPPED_METHODS = [
5
- :collect, :collect_concat, :drop, :drop_while, :first, :find_all, :flat_map,
6
- :grep, :map, :max, :min, :min_by, :partition, :reject, :select, :sort, :sort_by,
5
+ :collect, :collect_concat, :drop, :drop_while, :first, :find_all,
6
+ :grep, :max, :min, :min_by, :partition, :reject, :select, :sort, :sort_by,
7
7
  :take, :take_while
8
- ]
8
+ ] # map/flat_map are disabled because its often used to map something into another format
9
9
 
10
10
  def self.included(klass)
11
11
  klass.class_eval <<-eoruby
@@ -1,3 +1,3 @@
1
1
  module SelfEnumerable
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: self_enumerable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Sievers