backports 3.6.3 → 3.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: .
9
9
  specs:
10
- backports (3.6.3)
10
+ backports (3.6.4)
11
11
 
12
12
  GEM
13
13
  remote: http://rubygems.org/
@@ -1,10 +1,13 @@
1
1
  unless Enumerable.method_defined? :flat_map
2
- require 'backports/1.8.7/array/flatten'
3
-
4
2
  module Enumerable
5
- def flat_map(&block)
3
+ def flat_map
6
4
  return to_enum(:flat_map) unless block_given?
7
- map(&block).flatten(1)
5
+ r = []
6
+ each do |*args|
7
+ result = yield(*args)
8
+ result.respond_to?(:to_ary) ? r.concat(result) : r.push(result)
9
+ end
10
+ r
8
11
  end
9
12
  alias_method :collect_concat, :flat_map
10
13
  end
@@ -1,3 +1,3 @@
1
1
  module Backports
2
- VERSION = "3.6.3" unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
2
+ VERSION = "3.6.4" unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
3
3
  end
@@ -0,0 +1 @@
1
+ fails:Enumerable#collect_concat calls to_ary but not to_a
@@ -0,0 +1 @@
1
+ fails:Enumerable#flat_map calls to_ary but not to_a
metadata CHANGED
@@ -1,28 +1,38 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: backports
3
- version: !ruby/object:Gem::Version
4
- version: 3.6.3
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease:
6
+ segments:
7
+ - 3
8
+ - 6
9
+ - 4
10
+ version: 3.6.4
5
11
  platform: ruby
6
- authors:
7
- - Marc-André Lafortune
12
+ authors:
13
+ - "Marc-Andr\xC3\xA9 Lafortune"
8
14
  autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
- date: 2014-10-07 00:00:00.000000000 Z
17
+
18
+ date: 2014-11-13 00:00:00 Z
12
19
  dependencies: []
13
- description: Essential backports that enable many of the nice features of Ruby 1.8.7
14
- up to 2.1.0 for earlier versions.
15
- email:
20
+
21
+ description: Essential backports that enable many of the nice features of Ruby 1.8.7 up to 2.1.0 for earlier versions.
22
+ email:
16
23
  - github@marc-andre.ca
17
24
  executables: []
25
+
18
26
  extensions: []
27
+
19
28
  extra_rdoc_files: []
20
- files:
21
- - ".document"
22
- - ".gitignore"
23
- - ".gitmodules"
24
- - ".irbrc"
25
- - ".travis.yml"
29
+
30
+ files:
31
+ - .document
32
+ - .gitignore
33
+ - .gitmodules
34
+ - .irbrc
35
+ - .travis.yml
26
36
  - CHANGELOG.rdoc
27
37
  - Gemfile
28
38
  - Gemfile.lock
@@ -504,6 +514,8 @@ files:
504
514
  - spec/tags/1.8.7/core/array/select_spec.rb
505
515
  - spec/tags/1.8.7/core/array/uniq_spec.rb
506
516
  - spec/tags/1.8.7/core/complex/to_r_spec.rb
517
+ - spec/tags/1.8.7/core/enumerable/collect_concat_spec.rb
518
+ - spec/tags/1.8.7/core/enumerable/flat_map_spec.rb
507
519
  - spec/tags/1.8.7/core/env/to_h_spec.rb
508
520
  - spec/tags/1.8.7/core/file/lchmod_spec.rb
509
521
  - spec/tags/1.8.7/core/file/new_spec.rb
@@ -553,28 +565,38 @@ files:
553
565
  - test/test_helper.rb
554
566
  homepage: http://github.com/marcandre/backports
555
567
  licenses: []
556
- metadata: {}
568
+
557
569
  post_install_message:
558
570
  rdoc_options: []
559
- require_paths:
571
+
572
+ require_paths:
560
573
  - lib
561
- required_ruby_version: !ruby/object:Gem::Requirement
562
- requirements:
574
+ required_ruby_version: !ruby/object:Gem::Requirement
575
+ none: false
576
+ requirements:
563
577
  - - ">="
564
- - !ruby/object:Gem::Version
565
- version: '0'
566
- required_rubygems_version: !ruby/object:Gem::Requirement
567
- requirements:
578
+ - !ruby/object:Gem::Version
579
+ hash: 3
580
+ segments:
581
+ - 0
582
+ version: "0"
583
+ required_rubygems_version: !ruby/object:Gem::Requirement
584
+ none: false
585
+ requirements:
568
586
  - - ">="
569
- - !ruby/object:Gem::Version
570
- version: '0'
587
+ - !ruby/object:Gem::Version
588
+ hash: 3
589
+ segments:
590
+ - 0
591
+ version: "0"
571
592
  requirements: []
593
+
572
594
  rubyforge_project:
573
- rubygems_version: 2.2.2
595
+ rubygems_version: 1.8.25
574
596
  signing_key:
575
- specification_version: 4
597
+ specification_version: 3
576
598
  summary: Backports of Ruby features for older Ruby.
577
- test_files:
599
+ test_files:
578
600
  - spec/tags/1.8.6/core/argf/each_line_spec.rb
579
601
  - spec/tags/1.8.6/core/argf/each_spec.rb
580
602
  - spec/tags/1.8.6/core/argf/lines_spec.rb
@@ -643,6 +665,8 @@ test_files:
643
665
  - spec/tags/1.8.7/core/array/select_spec.rb
644
666
  - spec/tags/1.8.7/core/array/uniq_spec.rb
645
667
  - spec/tags/1.8.7/core/complex/to_r_spec.rb
668
+ - spec/tags/1.8.7/core/enumerable/collect_concat_spec.rb
669
+ - spec/tags/1.8.7/core/enumerable/flat_map_spec.rb
646
670
  - spec/tags/1.8.7/core/env/to_h_spec.rb
647
671
  - spec/tags/1.8.7/core/file/lchmod_spec.rb
648
672
  - spec/tags/1.8.7/core/file/new_spec.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: bb32545170e25b4326deea036ff2ecde37291dd0
4
- data.tar.gz: 555fa7791f6510224afea6fe96c4d21b9d7b5117
5
- SHA512:
6
- metadata.gz: 8fe397d00b446e9edda50e7183dd19912cb7f03cf6952328526dc6511a3aa29c039378ca6e83471c3321894115a67e2a23b85051d3596e9ce0de378f200f408d
7
- data.tar.gz: 53e1ae0e675b281d5a15818a7458cc3f82885c50fc99b4652c012aafcccd8c463d2ff58c8e2d591f9ff7bf8f0963c0cd261ae689412d8ea760a9a3f7ecfabe2d