2018-03-06 19:41:46 -05:00
|
|
|
* Fix bug where `URI.unscape` would fail with mixed Unicode/escaped character input:
|
|
|
|
|
|
|
|
URI.unescape("\xe3\x83\x90") # => "バ"
|
|
|
|
URI.unescape("%E3%83%90") # => "バ"
|
|
|
|
URI.unescape("\xe3\x83\x90%E3%83%90") # => Encoding::CompatibilityError
|
|
|
|
|
|
|
|
*Ashe Connor*, *Aaron Patterson*
|
|
|
|
|
2018-03-06 23:42:49 -05:00
|
|
|
* Add `before?` and `after?` methods to `Date`, `DateTime`,
|
|
|
|
`Time`, and `TimeWithZone`.
|
|
|
|
|
|
|
|
*Nick Holden*
|
|
|
|
|
2018-02-27 17:05:46 -05:00
|
|
|
* Add `:private` option to ActiveSupport's `Module#delegate`
|
|
|
|
in order to delegate methods as private:
|
2018-02-20 04:38:19 -05:00
|
|
|
|
|
|
|
class User < ActiveRecord::Base
|
|
|
|
has_one :profile
|
|
|
|
delegate :date_of_birth, to: :profile, private: true
|
|
|
|
|
|
|
|
def age
|
|
|
|
Date.today.year - date_of_birth.year
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# User.new.age # => 29
|
|
|
|
# User.new.date_of_birth
|
|
|
|
# => NoMethodError: private method `date_of_birth' called for #<User:0x00000008221340>
|
|
|
|
|
|
|
|
*Tomas Valent*
|
|
|
|
|
2016-12-09 13:34:35 -05:00
|
|
|
* `String#truncate_bytes` to truncate a string to a maximum bytesize without
|
|
|
|
breaking multibyte characters or grapheme clusters like 👩👩👦👦.
|
|
|
|
|
|
|
|
*Jeremy Daer*
|
|
|
|
|
2018-02-17 18:23:17 -05:00
|
|
|
* `String#strip_heredoc` preserves frozenness.
|
|
|
|
|
|
|
|
"foo".freeze.strip_heredoc.frozen? # => true
|
|
|
|
|
|
|
|
Fixes that frozen string literals would inadvertently become unfrozen:
|
|
|
|
|
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
foo = <<-MSG.strip_heredoc
|
|
|
|
la la la
|
|
|
|
MSG
|
|
|
|
|
|
|
|
foo.frozen? # => false !??
|
|
|
|
|
|
|
|
*Jeremy Daer*
|
|
|
|
|
2018-02-17 16:02:18 -05:00
|
|
|
* Rails 6 requires Ruby 2.4.1 or newer.
|
|
|
|
|
|
|
|
*Jeremy Daer*
|
|
|
|
|
2018-03-11 16:22:20 -04:00
|
|
|
* Adds parallel testing to Rails.
|
2018-02-17 16:02:18 -05:00
|
|
|
|
|
|
|
Parallelize your test suite with forked processes or threads.
|
|
|
|
|
|
|
|
*Eileen M. Uchitelle*, *Aaron Patterson*
|
2017-12-20 16:59:41 -05:00
|
|
|
|
2017-12-14 10:05:13 -05:00
|
|
|
|
2018-01-30 18:51:17 -05:00
|
|
|
Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/activesupport/CHANGELOG.md) for previous changes.
|