backports 3.11.4 → 3.12.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 +13 -5
- data/.travis.yml +2 -0
- data/CHANGELOG.rdoc +2 -0
- data/README.rdoc +28 -7
- data/Rakefile +15 -3
- data/backports.gemspec +7 -1
- data/default.mspec +6 -1
- data/lib/backports/1.9.1/string/codepoints.rb +1 -0
- data/lib/backports/2.1.0/enumerable/to_h.rb +2 -0
- data/lib/backports/2.5.0/string/undump.rb +65 -0
- data/lib/backports/2.6.0.rb +3 -0
- data/lib/backports/2.6.0/array.rb +3 -0
- data/lib/backports/2.6.0/array/difference.rb +5 -0
- data/lib/backports/2.6.0/array/to_h.rb +13 -0
- data/lib/backports/2.6.0/array/union.rb +5 -0
- data/lib/backports/2.6.0/enumerable.rb +3 -0
- data/lib/backports/2.6.0/enumerable/chain.rb +47 -0
- data/lib/backports/2.6.0/enumerable/to_h.rb +13 -0
- data/lib/backports/2.6.0/kernel.rb +3 -0
- data/lib/backports/2.6.0/kernel/then.rb +7 -0
- data/lib/backports/2.6.rb +2 -0
- data/lib/backports/version.rb +1 -1
- data/set_version/2.6.0.rb +1 -0
- data/spec/tags/1.8.7/core/array/to_h_spec.rb +3 -0
- data/spec/tags/1.8.7/core/enumerable/to_h_spec.rb +2 -0
- data/spec/tags/1.8.7/core/module/attr_spec.rb +1 -0
- data/spec/tags/1.9.1/core/hash/slice_spec.rb +1 -0
- data/spec/tags/1.9.1/core/module/attr_spec.rb +1 -0
- data/spec/tags/1.9.2/core/array/to_h_spec.rb +3 -0
- data/spec/tags/1.9.2/core/enumerable/to_h_spec.rb +2 -0
- data/spec/tags/1.9.2/core/hash/slice_spec.rb +1 -0
- data/spec/tags/1.9.2/core/kernel/then_spec.rb +1 -0
- data/spec/tags/1.9.3/core/hash/slice_spec.rb +1 -0
- data/spec/tags/2.0.0/core/array/to_h_spec.rb +3 -0
- data/spec/tags/2.0.0/core/enumerable/to_h_spec.rb +2 -0
- data/spec/tags/2.0.0/core/hash/slice_spec.rb +1 -0
- data/spec/tags/2.0.0/core/module/attr_spec.rb +1 -0
- data/spec/tags/2.1.0/core/array/union_spec.rb +1 -0
- data/spec/tags/2.1.0/core/hash/slice_spec.rb +1 -0
- data/spec/tags/2.1.0/core/module/attr_spec.rb +1 -0
- data/spec/tags/2.2.0/core/hash/slice_spec.rb +1 -0
- data/spec/tags/2.2.0/core/module/attr_spec.rb +1 -0
- data/spec/tags/2.3.0/core/hash/slice_spec.rb +1 -0
- data/spec/tags/2.3.0/core/module/attr_spec.rb +1 -0
- data/spec/tags/2.4.0/core/hash/slice_spec.rb +1 -0
- data/spec/tags/2.4.0/core/module/attr_spec.rb +1 -0
- data/test/_backport_guards_test.rb +5 -1
- metadata +75 -239
- data/spec/tags/1.8.6/core/argf/each_line_spec.rb +0 -6
- data/spec/tags/1.8.6/core/argf/each_spec.rb +0 -6
- data/spec/tags/1.8.6/core/argf/lines_spec.rb +0 -6
- data/spec/tags/1.8.6/core/array/bsearch_index_spec.rb +0 -1
- data/spec/tags/1.8.6/core/array/collect_spec.rb +0 -7
- data/spec/tags/1.8.6/core/array/rotate_spec.rb +0 -2
- data/spec/tags/1.8.6/core/array/uniq_spec.rb +0 -3
- data/spec/tags/1.8.6/core/complex/to_r_spec.rb +0 -3
- data/spec/tags/1.8.6/core/enumerable/each_entry_spec.rb +0 -1
- data/spec/tags/1.8.6/core/enumerator/next_spec.rb +0 -1
- data/spec/tags/1.8.6/core/env/to_h_spec.rb +0 -2
- data/spec/tags/1.8.6/core/file/join_spec.rb +0 -3
- data/spec/tags/1.8.6/core/file/lchmod_spec.rb +0 -2
- data/spec/tags/1.8.6/core/file/new_spec.rb +0 -2
- data/spec/tags/1.8.6/core/file/open_spec.rb +0 -13
- data/spec/tags/1.8.6/core/file/to_path_spec.rb +0 -1
- data/spec/tags/1.8.6/core/fixnum/fdiv_spec.rb +0 -1
- data/spec/tags/1.8.6/core/gc/stress_spec.rb +0 -2
- data/spec/tags/1.8.6/core/hash/assoc_spec.rb +0 -1
- data/spec/tags/1.8.6/core/hash/constructor_spec.rb +0 -3
- data/spec/tags/1.8.6/core/hash/default_proc_spec.rb +0 -3
- data/spec/tags/1.8.6/core/hash/delete_if_spec.rb +0 -1
- data/spec/tags/1.8.6/core/hash/each_pair_spec.rb +0 -1
- data/spec/tags/1.8.6/core/hash/eql_spec.rb +0 -3
- data/spec/tags/1.8.6/core/hash/hash_spec.rb +0 -3
- data/spec/tags/1.8.6/core/hash/keep_if_spec.rb +0 -2
- data/spec/tags/1.8.6/core/hash/rassoc_spec.rb +0 -1
- data/spec/tags/1.8.6/core/hash/reject_spec.rb +0 -2
- data/spec/tags/1.8.6/core/hash/select_spec.rb +0 -8
- data/spec/tags/1.8.6/core/hash/transform_values_spec.rb +0 -2
- data/spec/tags/1.8.6/core/integer/round_spec.rb +0 -2
- data/spec/tags/1.8.6/core/io/binread_spec.rb +0 -7
- data/spec/tags/1.8.6/core/io/chars_spec.rb +0 -1
- data/spec/tags/1.8.6/core/io/each_char_spec.rb +0 -1
- data/spec/tags/1.8.6/core/io/lines_spec.rb +0 -1
- data/spec/tags/1.8.6/core/io/open_spec.rb +0 -24
- data/spec/tags/1.8.6/core/io/ungetbyte_spec.rb +0 -4
- data/spec/tags/1.8.6/core/io/write_spec.rb +0 -5
- data/spec/tags/1.8.6/core/kernel/__callee___spec.rb +0 -6
- data/spec/tags/1.8.6/core/kernel/__method___spec.rb +0 -1
- data/spec/tags/1.8.6/core/kernel/define_singleton_method_spec.rb +0 -2
- data/spec/tags/1.8.6/core/kernel/public_method_spec.rb +0 -2
- data/spec/tags/1.8.6/core/kernel/require_relative_spec.rb +0 -3
- data/spec/tags/1.8.6/core/math/log2_spec.rb +0 -6
- data/spec/tags/1.8.6/core/math/log_spec.rb +0 -3
- data/spec/tags/1.8.6/core/module/class_exec_spec.rb +0 -2
- data/spec/tags/1.8.6/core/module/module_exec_spec.rb +0 -2
- data/spec/tags/1.8.6/core/numeric/step_spec.rb +0 -12
- data/spec/tags/1.8.6/core/proc/curry_spec.rb +0 -4
- data/spec/tags/1.8.6/core/range/step_spec.rb +0 -12
- data/spec/tags/1.8.6/core/string/getbyte_spec.rb +0 -6
- data/spec/tags/1.8.6/core/string/partition_spec.rb +0 -1
- data/spec/tags/1.8.6/core/string/prepend_spec.rb +0 -1
- data/spec/tags/1.8.6/core/string/rpartition_spec.rb +0 -1
- data/spec/tags/1.8.6/core/string/setbyte_spec.rb +0 -5
- data/spec/tags/1.8.6/core/string/uplus_spec.rb +0 -1
- data/spec/tags/1.8.6/core/string/upto_spec.rb +0 -1
- data/spec/tags/1.8.6/core/symbol/capitalize_spec.rb +0 -3
- data/spec/tags/1.8.6/core/symbol/comparison_spec.rb +0 -1
- data/spec/tags/1.8.6/core/symbol/downcase_spec.rb +0 -2
- data/spec/tags/1.8.6/core/symbol/element_reference_spec.rb +0 -4
- data/spec/tags/1.8.6/core/symbol/empty_spec.rb +0 -1
- data/spec/tags/1.8.6/core/symbol/match_spec.rb +0 -2
- data/spec/tags/1.8.6/core/symbol/swapcase_spec.rb +0 -2
- data/spec/tags/1.8.6/core/symbol/to_proc_spec.rb +0 -1
- data/spec/tags/1.8.6/core/symbol/upcase_spec.rb +0 -1
- data/spec/tags/1.8.7/core/array/bsearch_index_spec.rb +0 -1
- data/spec/tags/1.8.7/core/array/keep_if_spec.rb +0 -2
- data/spec/tags/1.8.7/core/array/rotate_spec.rb +0 -2
- data/spec/tags/1.8.7/core/array/select_spec.rb +0 -2
- data/spec/tags/1.8.7/core/array/uniq_spec.rb +0 -3
- data/spec/tags/1.8.7/core/complex/to_r_spec.rb +0 -3
- data/spec/tags/1.8.7/core/enumerable/collect_concat_spec.rb +0 -1
- data/spec/tags/1.8.7/core/enumerable/flat_map_spec.rb +0 -1
- data/spec/tags/1.8.7/core/env/to_h_spec.rb +0 -2
- data/spec/tags/1.8.7/core/file/lchmod_spec.rb +0 -2
- data/spec/tags/1.8.7/core/file/new_spec.rb +0 -1
- data/spec/tags/1.8.7/core/file/open_spec.rb +0 -5
- data/spec/tags/1.8.7/core/file/readlink_spec.rb +0 -6
- data/spec/tags/1.8.7/core/file/to_path_spec.rb +0 -1
- data/spec/tags/1.8.7/core/hash/assoc_spec.rb +0 -1
- data/spec/tags/1.8.7/core/hash/default_proc_spec.rb +0 -3
- data/spec/tags/1.8.7/core/hash/keep_if_spec.rb +0 -2
- data/spec/tags/1.8.7/core/hash/rassoc_spec.rb +0 -1
- data/spec/tags/1.8.7/core/hash/select_spec.rb +0 -1
- data/spec/tags/1.8.7/core/hash/transform_values_spec.rb +0 -2
- data/spec/tags/1.8.7/core/integer/round_spec.rb +0 -2
- data/spec/tags/1.8.7/core/io/binread_spec.rb +0 -7
- data/spec/tags/1.8.7/core/io/open_spec.rb +0 -32
- data/spec/tags/1.8.7/core/io/ungetbyte_spec.rb +0 -4
- data/spec/tags/1.8.7/core/io/write_spec.rb +0 -5
- data/spec/tags/1.8.7/core/kernel/__callee___spec.rb +0 -6
- data/spec/tags/1.8.7/core/kernel/define_singleton_method_spec.rb +0 -2
- data/spec/tags/1.8.7/core/kernel/public_method_spec.rb +0 -1
- data/spec/tags/1.8.7/core/kernel/require_relative_spec.rb +0 -3
- data/spec/tags/1.8.7/core/math/log2_spec.rb +0 -6
- data/spec/tags/1.8.7/core/math/log_spec.rb +0 -3
- data/spec/tags/1.8.7/core/module/include_spec.rb +0 -3
- data/spec/tags/1.8.7/core/proc/curry_spec.rb +0 -3
- data/spec/tags/1.8.7/core/proc/yield_spec.rb +0 -4
- data/spec/tags/1.8.7/core/range/size_spec.rb +0 -1
- data/spec/tags/1.8.7/core/string/getbyte_spec.rb +0 -5
- data/spec/tags/1.8.7/core/string/prepend_spec.rb +0 -1
- data/spec/tags/1.8.7/core/string/setbyte_spec.rb +0 -5
- data/spec/tags/1.8.7/core/string/uplus_spec.rb +0 -1
- data/spec/tags/1.8.7/core/symbol/capitalize_spec.rb +0 -3
- data/spec/tags/1.8.7/core/symbol/comparison_spec.rb +0 -1
- data/spec/tags/1.8.7/core/symbol/downcase_spec.rb +0 -2
- data/spec/tags/1.8.7/core/symbol/element_reference_spec.rb +0 -4
- data/spec/tags/1.8.7/core/symbol/empty_spec.rb +0 -1
- data/spec/tags/1.8.7/core/symbol/match_spec.rb +0 -2
- data/spec/tags/1.8.7/core/symbol/swapcase_spec.rb +0 -2
- data/spec/tags/1.8.7/core/symbol/upcase_spec.rb +0 -1
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
fails:IO.open uses the external encoding specified in the mode argument
|
|
2
|
-
fails:IO.open uses the external and the internal encoding specified in the mode argument
|
|
3
|
-
fails:IO.open uses the external encoding specified via the :external_encoding option
|
|
4
|
-
fails:IO.open uses the internal encoding specified via the :internal_encoding option
|
|
5
|
-
fails:IO.open uses the colon-separated encodings specified via the :encoding option
|
|
6
|
-
fails:IO.open ingores the :encoding option when the :external_encoding option is present
|
|
7
|
-
fails:IO.open ingores the :encoding option when the :internal_encoding option is present
|
|
8
|
-
fails:IO.open uses the encoding specified via the :mode option hash
|
|
9
|
-
fails:IO.open ignores the :internal_encoding option when the same as the external encoding
|
|
10
|
-
fails:IO.open sets internal encoding to nil when passed '-'
|
|
11
|
-
fails:IO.open raises an error if passed encodings two ways
|
|
12
|
-
fails:IO.open sets binmode from mode string
|
|
13
|
-
fails:IO.open does not set binmode without being asked
|
|
14
|
-
fails:IO.open sets binmode from :binmode option
|
|
15
|
-
fails:IO.open does not set binmode from false :binmode
|
|
16
|
-
fails:IO.open sets external encoding to binary with binmode in mode string
|
|
17
|
-
fails:IO.open does not use binary encoding when mode encoding is specified
|
|
18
|
-
fails:IO.open does not use binary encoding when :encoding option is specified
|
|
19
|
-
fails:IO.open does not use binary encoding when :external_encoding option is specified
|
|
20
|
-
fails:IO.open does not use binary encoding when :internal_encoding option is specified
|
|
21
|
-
fails:IO.open coerces mode with #to_int
|
|
22
|
-
fails:IO.open coerces options as second argument with #to_hash
|
|
23
|
-
fails:IO.open raises ArgumentError if not passed a hash or nil for options
|
|
24
|
-
fails:IO.open sets external encoding to binary with :binmode option
|
|
25
|
-
fails:IO.open raises an error if passed binary/text mode two ways
|
|
26
|
-
fails:IO.open uses the :encoding option as the external encoding when only one is given
|
|
27
|
-
fails:IO.open uses the :encoding options as the external encoding when it's an Encoding object
|
|
28
|
-
fails:IO.open coerces :encoding option with #to_str
|
|
29
|
-
fails:IO.open coerces :external_encoding option with #to_str
|
|
30
|
-
fails:IO.open coerces :internal_encoding option with #to_str
|
|
31
|
-
fails:IO.open accepts an :autoclose option
|
|
32
|
-
fails:IO.open accepts any truthy option :autoclose
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
fails:IO.write uses encoding from given options, if provided
|
|
2
|
-
fails:IO.write uses an :open_args option
|
|
3
|
-
fails:IO.write disregards other options if :open_args is given
|
|
4
|
-
fails:IO.write uses the given encoding and returns the number of bytes written
|
|
5
|
-
fails:IO.write writes binary data if no encoding is given
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
fails:Kernel.__callee__ returns the current method, even when aliased
|
|
2
|
-
fails:Kernel.__callee__ returns the original name when aliased method
|
|
3
|
-
fails:Kernel.__callee__ returns the caller from blocks too
|
|
4
|
-
fails:Kernel.__callee__ returns nil when not called from a method
|
|
5
|
-
fails:Kernel.__callee__ returns the caller when sent as a string
|
|
6
|
-
fails:Kernel.__callee__ returns the aliased name when aliased method
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
fails:Kernel#define_singleton_method when given an UnboundMethod defines any Child class method from any Parent's class methods
|
|
2
|
-
fails:Kernel#define_singleton_method when given an UnboundMethod will raise when attempting to define an object's singleton method from another object's singleton method
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fails:Kernel#public_method returns a method object if we repond_to_missing? method
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
fails:Kernel#require_relative with a relative path stores the missing path in a LoadError object
|
|
2
|
-
fails:Kernel#require_relative with a relative path when file is a symlink loads a path relative to current file
|
|
3
|
-
fails:Kernel#require_relative with an absolute path stores the missing path in a LoadError object
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
fails:Math.log2 raises an Errno::EDOM if the argument is less than 0
|
|
2
|
-
fails:Math.log2 raises an TypeError if the argument cannot be coerced with Float()
|
|
3
|
-
fails:Math.log2 raises an TypeError if passed a numerical argument as a string
|
|
4
|
-
fails:Math.log2 returns NaN given NaN
|
|
5
|
-
fails:Math.log2 raises a TypeError if the argument cannot be coerced with Float()
|
|
6
|
-
fails:Math.log2 raises a TypeError if passed a numerical argument as a string
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
fails:Proc#yield on a Proc created with Kernel#lambda or Kernel#proc ignores excess arguments when self is a proc
|
|
2
|
-
fails:Proc#yield on a Proc created with Kernel#lambda or Kernel#proc substitutes nil for missing arguments when self is a proc
|
|
3
|
-
fails:Proc#yield on a Proc created with Kernel#lambda or Kernel#proc raises an ArgumentError on excess arguments when self is a lambda
|
|
4
|
-
fails:Proc#yield on a Proc created with Kernel#lambda or Kernel#proc raises an ArgumentError on missing arguments when self is a lambda
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fails:Range#size returns nil if first and last are not Numeric
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
fails:String#getbyte returns an Integer between 0 and 255
|
|
2
|
-
fails:String#getbyte regards a multi-byte character as having multiple bytes
|
|
3
|
-
fails:String#getbyte interprets bytes relative to the String's encoding
|
|
4
|
-
fails:String#getbyte raises an ArgumentError unless given one argument
|
|
5
|
-
fails:String#getbyte raises a TypeError unless its argument can be coerced into an Integer
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fails:String#prepend raises a RuntimeError when self if frozen
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
fails:String#setbyte allows changing bytes in multi-byte characters
|
|
2
|
-
fails:String#setbyte can invalidate a String's encoding
|
|
3
|
-
fails:String#setbyte sets a byte at an index greater than String size
|
|
4
|
-
fails:String#setbyte raises a RuntimeError if self is frozen
|
|
5
|
-
fails:String#setbyte raises a TypeError unless the second argument is an Integer
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fails:String#+@ returns mutable copy despite freeze-magic-comment in file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fails:Symbol#<=> with Symbol compares individual characters based on their ascii value
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
fails:Symbol#[] with a Regex slice without a capture index sets $~ to the MatchData if there is a match
|
|
2
|
-
fails:Symbol#[] with a Regex slice with a capture index sets $~ to the MatchData if there is a match
|
|
3
|
-
fails:Symbol#[] with a Regex slice without a capture index returns an untrusted string if the regexp is untrusted
|
|
4
|
-
fails:Symbol#[] with a Regex slice with a capture index returns an untrusted string if the regexp is untrusted
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fails:Symbol#empty? returns true if self is empty
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fails:Symbol#upcase leaves lowercase Unicode characters as they were
|