Release 2.2.0
- Add support for Ruby 2.4
- Change most remaining interfaces to use keyword options. (Change most of the remaining
options = {}
to**options
.) - Change implementation of
#to_hash
to#to_h
and deprecate#to_hash
. This is required because#to_hash
is an implicit accessor, which causes problems for methods using keyword options. - Deprecate
Enumerator#to_ary
andStatement#to_ary
- Add
Literal#to_str
for string-like datatypes
As methods taking keyword options implicitly try to turn the last argument into a hash (using #to_hash
), this problem can be avoided by ensuring that the last argument is always a hash (empty if necessary). This mostly affects URI#initialize
, and Query#initialize
.
Array()
uses implicit #to_ary
. As this pattern is fairly pervasive, DEPRECATION warnings are not issued. In a future release both #to_ary
and #to_hash
will be removed entirely, which will make interfaces more consistent. The plan is for this to be done in a future 3.0 release.