All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
3.25.0 - 2024-03-05
MatchData#named_captures
(withsymbolize_keys
option, Ruby 3.3)Range.reverse_each
(Ruby 3.3)Range#overlap?
(Ruby 3.3)
3.24.0 - 2023-03-07
Class#attached_object
(Ruby 3.2)Data
(Ruby 3.2)Enumerator.product
andEnumerator::Product
(Ruby 3.2)Hash#shift
(with correct behavior when empty) (Ruby 3.2)Integer#ceildiv
(Ruby 3.2)MatchData#byteoffset
(Ruby 3.2)Symbol#start_with?
(Ruby 2.7)
Class#descendants
(removed, as it was not actually added in Ruby 3.1, sorry)
3.23.0 - 2021-12-28
Integer.try_convert
(Ruby 3.1)Symbol.end_with?
(Ruby 2.7) [#171]
3.22.1 - 2021-12-27
Ruby 3.1 backports:
intersect?
descendants
subclasses
compact
tally
(with hash argument)
dirname
(with depth argument)
match
match_length
keyword_init?
3.21.0 - 2021-03-31
- Added
String#unpack1
(Ruby 2.4) [#166]
3.20.1 - 2021-01-03
- Added
Ractor.[]
and[]=
[#161] Ractor.current
fixed from threads [#161]
3.20.0 - 2020-12-30
Ractor backport (all methods)
3.19.0 - 2020-12-28
-
Ruby 3.0 backports
-
Env
except
-
Hash
except
transform_keys
,transform_keys!
(with hash argument)
-
Symbol
name
-
-
Ruby 2.3 backports
- Queue
close
,closed?
(affectspush
,pop
and aliases)
- Queue
3.18.2 - 2020-08-26
Require per ruby version now properly requiring 2.3.0 backports for String
[#152]
3.18.1 - 2020-06-22
Fixed Changelog URI in gem manifest
3.18.0 - 2020-06-22
Require per ruby version / all requires now check RUBY_VERSION
to be more efficient [#149]
3.17.2 - 2020-04-09
Fix Range#cover (Ruby 2.6.0) [#148]
3.17.1 - 2020-04-09
Fix Range#size (Ruby 2.0) on Ruby 1.8.7 [#144]
3.17.0 - 2020-03-06
-
Ruby 2.6 backports
- Range
cover?
(withRange
argument)
- Range
Requiring features for a particular version of Ruby or latest
is un-deprecated but
instead simply warned in verbose mode.
3.16.1 - 2020-02-16
Officially deprecate requiring features for a particular version of Ruby, latest
, std_lib
or rails
backports.
Partly un-deprecated in 3.17.0!
matrix
library when loaded in 2.7.0 [#141]
3.16.0 - 2020-02-06
-
Ruby 2.7 backports
-
Array
intersection
-
Comparable
clamp
(with range)
-
Complex
<=>
-
Enumerable
filter_map
tally
-
Enumerator
produce
(class method)
-
Time
floor
,ceil
-
3.15.0 - 2019-05-15
- Proc / Method
<<
,>>
- Hash
to_h
(with block)
- Hash
merge
,merge!
/update
(with multiple arguments)
-
Ruby 2.6.0 backports
-
Array
difference
,union
to_h
(with block)
-
Enumerable
chain
to_h
(with block)
-
Enumerator::Chain (use Enumerable#chain)
-
Kernel
then
-
-
Additional backports for 2.5.0:
- String
undump
- String
-
Ruby version 2.5.0 backports
-
Array
append
,prepend
-
Dir
children
,each_child
-
Enumerable
any?
,all?
,none?
,one?
(with pattern argument)
-
Hash
slice
transform_keys
-
Integer
sqrt
allbits?
,anybits?
andnobits?
-
Kernel
yield_self
-
Module
attr
,attr_accessor
,attr_reader
,attr_writer
(now public)define_method
,alias_method
,undef_method
,remove_method
(now public)
-
String
delete_prefix
,delete_prefix!
delete_suffix
,delete_suffix!
-
Struct
new
(withkeyword_init: true
)
-
-
require 'backports/latest'
is now the way to require everything, but is discouraged
-
Additional features of 2.4.0
-
Enumerable
uniq
sum
-
Hash
compact
transform_values
-
- From 2.4.0:
dup
fortrue
,false
,nil
, Numeric - From 2.2.0:
Method#super_method
-
From 2.4.0:
String#match?
,Regexp#match?
-
From 2.3.0:
- unary
String#+
,-
- Numeric:
positive?
,negative?
- Hash:
to_proc
,fetch_values
,>
,<
,>=
,<=
- Enumerable:
chunk_while
,grep_v
{Array|Hash|Struct}#dig
Array#bsearch_index
- unary
-
From 2.2.0:
Method#curry
String#unicode_normalize{|?|!}
Kernel#itself
- Float:
next_float
,prev_float
Initiate work on backports of 2.2, 2.3, 2.4
-
From 2.4.0:
Comparable#clamp
-
From 2.2.0:
- Enumerable:
slice_when
,slice_after
- Enumerable:
- Additional features of 2.1.0
- Bignum#bit_length
- Fixnum#bit_length
- Module#include (now public)
- Additional features of 2.0.0
- Range#size
- Additional features of 2.1.0
- Array#to_h, Enumerable#to_h
- Moved
Proc#yield
&Hash#key
from 1.8.7 to 1.9.1
- Moved
Dir.mktmpdir
to the stdlib 'tmpdir' for Ruby 1.8.7
- Removed
returning
as it is no longer part of Rails.
- Backports can now be loaded separately!
- Small tweaks and fixes for many methods to pass more RubySpecs
-
Additional features of 2.0.0
- Struct#to_h, NilClass#to_h, Hash#to_h
- Hash#default_proc = nil
- OpenStruct lib
-
1.8.7's Enumerator#with_index (it wasn't in the 1.8.7 NEWS file...)
- Added some features of 2.0.0 (must be required explicitly until official
release):
- Array#bsearch
- Range#bsearch
- Features of 2.0.0 (must be required explicitly until official
release):
- Enumerable#lazy
- Enumerator::Lazy
- Enumerable#join
- Some features of 1.9.3:
- IO::NULL
- IO#advise
- String#byteslice
- String#prepend
-
Add backporting for libraries
-
Bring libraries up to date:
- Matrix
- Prime
- Set
-
Some features of 1.9.3:
- IO.write, IO.binwrite
-
Forcing backports (must be required explicitly):
- Hash#select (returns a Hash instead of an Array)
- Enumerable / Array#map (returns an enumerator when called without a block)
- String#length, size (for UTF-8 support)
Enumerator::Yielder#<<
-
Ruby 1.8.8 was officially cancelled; code was moved to Ruby 1.9.1 and README updated.
-
"".ord
now raises an error.
- Proc#curry, #lambda (thanks Konstantine Haase)
Change of major version because of two small changes that are not quite compatible and because the minor version was getting quite high!
-
Remove attempt at faking the new method missing. Unless you used
respond_to_missing
andmethod(:some_method_handled_with_method_missing)
, you won't see a difference, except better performance (see issue #32) and this fixes some errors (see issue #34) -
Change behavior of array.flatten(0) to match Ruby 1.9 (i.e. return a dup of array, instead of array itself)
-
Some features of 1.9.1:
- Math#log2, Math#log with base
- Enumerator#each in 1.8.6.
-
Some features of 1.9.2:
- Array#repeated_combination, #repeated_permutation
-
Some features of 1.9.2:
- Array#uniq, #uniq! (with block)
- Array#product (with block)
- Dir.home
- Hash#keep_if, select!
- Random (new class)
-
A features of 1.9.2:
- Object#singleton_class
-
Some features of 1.9.2:
- Array#rotate, rotate!
- Array#keep_if, select!
- Array#sort_by!
- Enumerable#join
- Enumerable#slice_before
- Float::INFINITY, NAN
- MatchData#==
- Missing for 1.8.7 were
- Array#permutation
- Hash#hash (was only inherited)
- Hash#eql? (was only inherited)
-
Finer grain includes (see README) require "backports/1.9" # requires all ruby backports require "backports/1.9.1" # requires all ruby backports up to 1.9.1 (but not 1.9.2)
-
Backported all builtin methods of 1.8.8 (most of which where moved from the 1.9 backports)
-
Refreshed README
-
Enumerable#flat_map / collect_concat (Ruby 1.9)
-
Object#public_send (Ruby 1.9)
-
Object#public_method (Ruby 1.9)
-
Enumerable#chunk (Ruby 1.9)
-
Kernel#respond_to_missing? (Ruby 1.9)
-
Completed Process.exec (Ruby 1.8.7)
-
In Ruby 1.9, most class methods of File accept filenames as String, or convertible via #to_str or #to_path.
-
File#to_path is also an alias to File#path. These have been backported.
-
File.binread (actually IO.binread)
-
BasicObject available via "require 'backports/basic_object"
Dir.mktmpdir
for older version of 1.8.6
The alias String#lines (Ruby 1.8.7)
Backports can be required selectively:
- backports/1.8.7
- backports/1.9 (which include 1.8.7)
- rails
Enumerable#take
and Enumerable#first(n)
are now returning as soon as possible.
Previously, #each
was yielding one element too many. See redmine issue #1554.
Porting all 1.8.7 features to rubinius was quite enlightening (http://blog.marc-andre.ca/2009/05/schizo-ruby-puzzle.html ). Many improvements were made to be consistent with MRI, e.g. converting arguments using to_int if needed, etc... The changes are now reflected in 'backports'.
Some IO and ARGF methods were missing and are now complete.
Important bug fix. String#gsub
is left alone until I find a good way to modify
it.
Completed backport to 1.8.7.
-
Array
extract_options!
-
Binding
eval
-
Dir
each
,foreach
-
Enumerator
new
with_object
next
,rewind
-
Hash
- Optional block for
delete_if, each, each_key, each_pair, each_value, reject!, select
(and ENV)
- Optional block for
-
Integer
- moved stuff out of Fixnum
- Optional block for
downto
,times
,upto
-
IO
- Optional block for
each
,each_line
,each_byte
,foreach
(and ARGF)
- Optional block for
-
Kernel
loop
,StopIteration
- +method+, +callee+
-
Method
name
,owner
,receiver
-
Module
class_exec
,module_exec
-
Numeric
step
-
Object
define_singleton_method
instance_exec
-
ObjectSpace
each_object
-
Range
- Optional block for
each
,step
- Optional block for
-
Regexp
union
-
String
try_convert
ascii_only?
bytesize
chr
clear
codepoints
,each_codepoint
stringify_keys
,stringify_keys!
each
,each_line
,each_byte
gsub
upto
-
Struct
each
,each_pair
-
Symbol
<=>
,casecmp
capitalize
,downcase
,next
,succ
,swapcase
,upcase
=~, [], empty?, length, match, size
-
UnboundMethod
name
,owner
-
Array (completed)
combination
try_convert
- Optional block for
collect!, :map!, :each, :each_index, :reject, :reject!, :delete_if
pop
,shift
product
-
Fixnum (completed)
div
,fdiv
succ
magnitude
-
Enumerable (completed)
each_with_object
inject
max_by
,min_by
,minmax
,minmax_by
reduce
to_a
-
String
rpartition
-
Proc
yield
-
Enumerable
none?
-
Array
sample
,shuffle
,shuffle!
-
String
each_char
,chars
partition
Tests and fixes for String#start_with?
and String#end_with?
-
Array
reverse_each
cycle
-
Enumerable
reverse_each
each_slice
,each_cons
count
cycle
group_by
-
Hash
default_proc=
-
Array
flatten
,flatten!
find_index
,index
-
Hash
reverse_merge
,reverse_merge!
- Initial release.
The format is based on Keep a Changelog.