backports 3.13.0 → 3.14.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 +4 -4
- data/CHANGELOG.rdoc +5 -0
- data/README.rdoc +1 -0
- data/frozen_old_spec/tags/1.8.7/core/hash/to_h_spec.rb +1 -0
- data/lib/backports/2.6.0/hash/to_h.rb +14 -0
- data/lib/backports/version.rb +1 -1
- data/spec/tags/1.8.7/core/module/include_spec.rb +1 -0
- data/spec/tags/1.9.2/core/hash/to_h_spec.rb +3 -0
- data/spec/tags/1.9.2/core/module/include_spec.rb +1 -0
- data/spec/tags/1.9.3/core/hash/to_h_spec.rb +3 -0
- data/spec/tags/1.9.3/core/module/include_spec.rb +1 -0
- data/spec/tags/2.0.0/core/hash/to_h_spec.rb +3 -0
- data/spec/tags/2.0.0/core/module/include_spec.rb +1 -0
- data/spec/tags/2.1.0/core/hash/to_h_spec.rb +1 -0
- data/spec/tags/2.2.0/core/hash/to_h_spec.rb +1 -0
- data/spec/tags/2.3.0/core/hash/to_h_spec.rb +1 -0
- data/spec/tags/2.4.0/core/hash/to_h_spec.rb +1 -0
- data/spec/tags/2.5.0/core/hash/to_h_spec.rb +1 -0
- metadata +28 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3083b4e87452fa1cbc1ed0d598c41bff5e88841f34c616ccf881691633a45b3
|
4
|
+
data.tar.gz: 70c248532e302112a98bb58809f366997e36031c211dff5d40a5d933b39270e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19c74b246816260733f97bacef04d546ae6201f6ae80740d827784540572439e09c412c6253db58663dc93511e11d4b8ef871b54b4f1fe08487da06090c72498
|
7
|
+
data.tar.gz: abc48b0560e6d9503e4e42122dc437cfc24a1fbd1e3a4b8e9a1df7d71863146a29363adc05743f80689e2a5d280bf0674f8c8da2d0a3cad999d04b6295e662d5
|
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
fails:Hash#to_h when called on a subclass of Hash copies the default_proc
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'backports/2.0.0/hash/to_h' unless Hash.method_defined? :to_h
|
2
|
+
|
3
|
+
if {:n => true}.to_h{[:ok, true]}[:n]
|
4
|
+
require 'backports/tools/alias_method_chain'
|
5
|
+
require 'backports/2.1.0/array/to_h'
|
6
|
+
|
7
|
+
class Hash
|
8
|
+
def to_h_with_block(&block)
|
9
|
+
return to_h_without_block unless block
|
10
|
+
map(&block).to_h
|
11
|
+
end
|
12
|
+
Backports.alias_method_chain self, :to_h, :block
|
13
|
+
end
|
14
|
+
end
|
data/lib/backports/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
fails:Module#include doesn't accept no-arguments
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:Module#include doesn't accept no-arguments
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:Module#include doesn't accept no-arguments
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:Module#include doesn't accept no-arguments
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:Hash#to_h with block raises ArgumentError if block returns longer or shorter array
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:Hash#to_h with block raises ArgumentError if block returns longer or shorter array
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:Hash#to_h with block raises ArgumentError if block returns longer or shorter array
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:Hash#to_h with block raises ArgumentError if block returns longer or shorter array
|
@@ -0,0 +1 @@
|
|
1
|
+
fails:Hash#to_h with block raises ArgumentError if block returns longer or shorter array
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc-André Lafortune
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Essential backports that enable many of the nice features of Ruby for
|
14
14
|
earlier versions.
|
@@ -131,6 +131,7 @@ files:
|
|
131
131
|
- frozen_old_spec/tags/1.8.7/core/hash/merge_spec.rb
|
132
132
|
- frozen_old_spec/tags/1.8.7/core/hash/rassoc_spec.rb
|
133
133
|
- frozen_old_spec/tags/1.8.7/core/hash/select_spec.rb
|
134
|
+
- frozen_old_spec/tags/1.8.7/core/hash/to_h_spec.rb
|
134
135
|
- frozen_old_spec/tags/1.8.7/core/hash/update_spec.rb
|
135
136
|
- frozen_old_spec/tags/1.8.7/core/integer/round_spec.rb
|
136
137
|
- frozen_old_spec/tags/1.8.7/core/io/binread_spec.rb
|
@@ -755,6 +756,7 @@ files:
|
|
755
756
|
- lib/backports/2.6.0/enumerable/to_h.rb
|
756
757
|
- lib/backports/2.6.0/hash.rb
|
757
758
|
- lib/backports/2.6.0/hash/merge.rb
|
759
|
+
- lib/backports/2.6.0/hash/to_h.rb
|
758
760
|
- lib/backports/2.6.0/hash/update.rb
|
759
761
|
- lib/backports/2.6.0/kernel.rb
|
760
762
|
- lib/backports/2.6.0/kernel/then.rb
|
@@ -807,6 +809,7 @@ files:
|
|
807
809
|
- spec/tags/1.8.7/core/array/to_h_spec.rb
|
808
810
|
- spec/tags/1.8.7/core/enumerable/to_h_spec.rb
|
809
811
|
- spec/tags/1.8.7/core/module/attr_spec.rb
|
812
|
+
- spec/tags/1.8.7/core/module/include_spec.rb
|
810
813
|
- spec/tags/1.9.1/core/array/bsearch_index_spec.rb
|
811
814
|
- spec/tags/1.9.1/core/array/rotate_spec.rb
|
812
815
|
- spec/tags/1.9.1/core/dir/each_child_spec.rb
|
@@ -831,6 +834,7 @@ files:
|
|
831
834
|
- spec/tags/1.9.2/core/dir/each_child_spec.rb
|
832
835
|
- spec/tags/1.9.2/core/enumerable/to_h_spec.rb
|
833
836
|
- spec/tags/1.9.2/core/hash/slice_spec.rb
|
837
|
+
- spec/tags/1.9.2/core/hash/to_h_spec.rb
|
834
838
|
- spec/tags/1.9.2/core/hash/transform_keys_spec.rb
|
835
839
|
- spec/tags/1.9.2/core/hash/transform_values_spec.rb
|
836
840
|
- spec/tags/1.9.2/core/io/write_spec.rb
|
@@ -842,11 +846,13 @@ files:
|
|
842
846
|
- spec/tags/1.9.2/core/module/attr_reader_spec.rb
|
843
847
|
- spec/tags/1.9.2/core/module/attr_writer_spec.rb
|
844
848
|
- spec/tags/1.9.2/core/module/define_method_spec.rb
|
849
|
+
- spec/tags/1.9.2/core/module/include_spec.rb
|
845
850
|
- spec/tags/1.9.2/core/string/uplus_spec.rb
|
846
851
|
- spec/tags/1.9.2/core/struct/new_spec.rb
|
847
852
|
- spec/tags/1.9.3/core/array/bsearch_index_spec.rb
|
848
853
|
- spec/tags/1.9.3/core/dir/each_child_spec.rb
|
849
854
|
- spec/tags/1.9.3/core/hash/slice_spec.rb
|
855
|
+
- spec/tags/1.9.3/core/hash/to_h_spec.rb
|
850
856
|
- spec/tags/1.9.3/core/hash/transform_keys_spec.rb
|
851
857
|
- spec/tags/1.9.3/core/hash/transform_values_spec.rb
|
852
858
|
- spec/tags/1.9.3/core/io/write_spec.rb
|
@@ -857,20 +863,24 @@ files:
|
|
857
863
|
- spec/tags/1.9.3/core/module/attr_reader_spec.rb
|
858
864
|
- spec/tags/1.9.3/core/module/attr_writer_spec.rb
|
859
865
|
- spec/tags/1.9.3/core/module/define_method_spec.rb
|
866
|
+
- spec/tags/1.9.3/core/module/include_spec.rb
|
860
867
|
- spec/tags/1.9.3/core/string/uplus_spec.rb
|
861
868
|
- spec/tags/1.9.3/core/struct/new_spec.rb
|
862
869
|
- spec/tags/2.0.0/core/array/to_h_spec.rb
|
863
870
|
- spec/tags/2.0.0/core/enumerable/to_h_spec.rb
|
864
871
|
- spec/tags/2.0.0/core/hash/slice_spec.rb
|
872
|
+
- spec/tags/2.0.0/core/hash/to_h_spec.rb
|
865
873
|
- spec/tags/2.0.0/core/module/attr_accessor_spec.rb
|
866
874
|
- spec/tags/2.0.0/core/module/attr_reader_spec.rb
|
867
875
|
- spec/tags/2.0.0/core/module/attr_spec.rb
|
868
876
|
- spec/tags/2.0.0/core/module/attr_writer_spec.rb
|
869
877
|
- spec/tags/2.0.0/core/module/define_method_spec.rb
|
878
|
+
- spec/tags/2.0.0/core/module/include_spec.rb
|
870
879
|
- spec/tags/2.0.0/core/string/uplus_spec.rb
|
871
880
|
- spec/tags/2.0.0/core/struct/new_spec.rb
|
872
881
|
- spec/tags/2.1.0/core/array/union_spec.rb
|
873
882
|
- spec/tags/2.1.0/core/hash/slice_spec.rb
|
883
|
+
- spec/tags/2.1.0/core/hash/to_h_spec.rb
|
874
884
|
- spec/tags/2.1.0/core/module/attr_accessor_spec.rb
|
875
885
|
- spec/tags/2.1.0/core/module/attr_reader_spec.rb
|
876
886
|
- spec/tags/2.1.0/core/module/attr_spec.rb
|
@@ -879,6 +889,7 @@ files:
|
|
879
889
|
- spec/tags/2.1.0/core/string/uplus_spec.rb
|
880
890
|
- spec/tags/2.1.0/core/struct/new_spec.rb
|
881
891
|
- spec/tags/2.2.0/core/hash/slice_spec.rb
|
892
|
+
- spec/tags/2.2.0/core/hash/to_h_spec.rb
|
882
893
|
- spec/tags/2.2.0/core/module/attr_accessor_spec.rb
|
883
894
|
- spec/tags/2.2.0/core/module/attr_reader_spec.rb
|
884
895
|
- spec/tags/2.2.0/core/module/attr_spec.rb
|
@@ -887,12 +898,15 @@ files:
|
|
887
898
|
- spec/tags/2.2.0/core/string/uplus_spec.rb
|
888
899
|
- spec/tags/2.2.0/core/struct/new_spec.rb
|
889
900
|
- spec/tags/2.3.0/core/hash/slice_spec.rb
|
901
|
+
- spec/tags/2.3.0/core/hash/to_h_spec.rb
|
890
902
|
- spec/tags/2.3.0/core/module/attr_spec.rb
|
891
903
|
- spec/tags/2.3.0/core/string/uplus_spec.rb
|
892
904
|
- spec/tags/2.3.0/core/struct/new_spec.rb
|
893
905
|
- spec/tags/2.4.0/core/hash/slice_spec.rb
|
906
|
+
- spec/tags/2.4.0/core/hash/to_h_spec.rb
|
894
907
|
- spec/tags/2.4.0/core/module/attr_spec.rb
|
895
908
|
- spec/tags/2.4.0/core/struct/new_spec.rb
|
909
|
+
- spec/tags/2.5.0/core/hash/to_h_spec.rb
|
896
910
|
- test/README
|
897
911
|
- test/_backport_guards_test.rb
|
898
912
|
- test/bit_length_test.rb
|
@@ -929,6 +943,7 @@ test_files:
|
|
929
943
|
- spec/tags/1.8.7/core/array/to_h_spec.rb
|
930
944
|
- spec/tags/1.8.7/core/enumerable/to_h_spec.rb
|
931
945
|
- spec/tags/1.8.7/core/module/attr_spec.rb
|
946
|
+
- spec/tags/1.8.7/core/module/include_spec.rb
|
932
947
|
- spec/tags/1.9.1/core/array/bsearch_index_spec.rb
|
933
948
|
- spec/tags/1.9.1/core/array/rotate_spec.rb
|
934
949
|
- spec/tags/1.9.1/core/dir/each_child_spec.rb
|
@@ -953,6 +968,7 @@ test_files:
|
|
953
968
|
- spec/tags/1.9.2/core/dir/each_child_spec.rb
|
954
969
|
- spec/tags/1.9.2/core/enumerable/to_h_spec.rb
|
955
970
|
- spec/tags/1.9.2/core/hash/slice_spec.rb
|
971
|
+
- spec/tags/1.9.2/core/hash/to_h_spec.rb
|
956
972
|
- spec/tags/1.9.2/core/hash/transform_keys_spec.rb
|
957
973
|
- spec/tags/1.9.2/core/hash/transform_values_spec.rb
|
958
974
|
- spec/tags/1.9.2/core/io/write_spec.rb
|
@@ -964,11 +980,13 @@ test_files:
|
|
964
980
|
- spec/tags/1.9.2/core/module/attr_reader_spec.rb
|
965
981
|
- spec/tags/1.9.2/core/module/attr_writer_spec.rb
|
966
982
|
- spec/tags/1.9.2/core/module/define_method_spec.rb
|
983
|
+
- spec/tags/1.9.2/core/module/include_spec.rb
|
967
984
|
- spec/tags/1.9.2/core/string/uplus_spec.rb
|
968
985
|
- spec/tags/1.9.2/core/struct/new_spec.rb
|
969
986
|
- spec/tags/1.9.3/core/array/bsearch_index_spec.rb
|
970
987
|
- spec/tags/1.9.3/core/dir/each_child_spec.rb
|
971
988
|
- spec/tags/1.9.3/core/hash/slice_spec.rb
|
989
|
+
- spec/tags/1.9.3/core/hash/to_h_spec.rb
|
972
990
|
- spec/tags/1.9.3/core/hash/transform_keys_spec.rb
|
973
991
|
- spec/tags/1.9.3/core/hash/transform_values_spec.rb
|
974
992
|
- spec/tags/1.9.3/core/io/write_spec.rb
|
@@ -979,20 +997,24 @@ test_files:
|
|
979
997
|
- spec/tags/1.9.3/core/module/attr_reader_spec.rb
|
980
998
|
- spec/tags/1.9.3/core/module/attr_writer_spec.rb
|
981
999
|
- spec/tags/1.9.3/core/module/define_method_spec.rb
|
1000
|
+
- spec/tags/1.9.3/core/module/include_spec.rb
|
982
1001
|
- spec/tags/1.9.3/core/string/uplus_spec.rb
|
983
1002
|
- spec/tags/1.9.3/core/struct/new_spec.rb
|
984
1003
|
- spec/tags/2.0.0/core/array/to_h_spec.rb
|
985
1004
|
- spec/tags/2.0.0/core/enumerable/to_h_spec.rb
|
986
1005
|
- spec/tags/2.0.0/core/hash/slice_spec.rb
|
1006
|
+
- spec/tags/2.0.0/core/hash/to_h_spec.rb
|
987
1007
|
- spec/tags/2.0.0/core/module/attr_accessor_spec.rb
|
988
1008
|
- spec/tags/2.0.0/core/module/attr_reader_spec.rb
|
989
1009
|
- spec/tags/2.0.0/core/module/attr_spec.rb
|
990
1010
|
- spec/tags/2.0.0/core/module/attr_writer_spec.rb
|
991
1011
|
- spec/tags/2.0.0/core/module/define_method_spec.rb
|
1012
|
+
- spec/tags/2.0.0/core/module/include_spec.rb
|
992
1013
|
- spec/tags/2.0.0/core/string/uplus_spec.rb
|
993
1014
|
- spec/tags/2.0.0/core/struct/new_spec.rb
|
994
1015
|
- spec/tags/2.1.0/core/array/union_spec.rb
|
995
1016
|
- spec/tags/2.1.0/core/hash/slice_spec.rb
|
1017
|
+
- spec/tags/2.1.0/core/hash/to_h_spec.rb
|
996
1018
|
- spec/tags/2.1.0/core/module/attr_accessor_spec.rb
|
997
1019
|
- spec/tags/2.1.0/core/module/attr_reader_spec.rb
|
998
1020
|
- spec/tags/2.1.0/core/module/attr_spec.rb
|
@@ -1001,6 +1023,7 @@ test_files:
|
|
1001
1023
|
- spec/tags/2.1.0/core/string/uplus_spec.rb
|
1002
1024
|
- spec/tags/2.1.0/core/struct/new_spec.rb
|
1003
1025
|
- spec/tags/2.2.0/core/hash/slice_spec.rb
|
1026
|
+
- spec/tags/2.2.0/core/hash/to_h_spec.rb
|
1004
1027
|
- spec/tags/2.2.0/core/module/attr_accessor_spec.rb
|
1005
1028
|
- spec/tags/2.2.0/core/module/attr_reader_spec.rb
|
1006
1029
|
- spec/tags/2.2.0/core/module/attr_spec.rb
|
@@ -1009,12 +1032,15 @@ test_files:
|
|
1009
1032
|
- spec/tags/2.2.0/core/string/uplus_spec.rb
|
1010
1033
|
- spec/tags/2.2.0/core/struct/new_spec.rb
|
1011
1034
|
- spec/tags/2.3.0/core/hash/slice_spec.rb
|
1035
|
+
- spec/tags/2.3.0/core/hash/to_h_spec.rb
|
1012
1036
|
- spec/tags/2.3.0/core/module/attr_spec.rb
|
1013
1037
|
- spec/tags/2.3.0/core/string/uplus_spec.rb
|
1014
1038
|
- spec/tags/2.3.0/core/struct/new_spec.rb
|
1015
1039
|
- spec/tags/2.4.0/core/hash/slice_spec.rb
|
1040
|
+
- spec/tags/2.4.0/core/hash/to_h_spec.rb
|
1016
1041
|
- spec/tags/2.4.0/core/module/attr_spec.rb
|
1017
1042
|
- spec/tags/2.4.0/core/struct/new_spec.rb
|
1043
|
+
- spec/tags/2.5.0/core/hash/to_h_spec.rb
|
1018
1044
|
- test/README
|
1019
1045
|
- test/_backport_guards_test.rb
|
1020
1046
|
- test/bit_length_test.rb
|