| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This prevents duplication of code.
Prevent duplication of tests by moving them to `DateAndTimeBehavior`.
Related to #32185.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Add `before?` and `after?` methods to date and time classes
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Equality comparisons between dates and times can take some extra time to
comprehend. I tend to think of a date or time as "before" or "after"
another date or time, but I naturally read `<` and `>` as "less than"
and "greater than." This change seeks to make date/time comparisons more
human readable.
|
|\ \ \ \
| | | | |
| | | | | |
Fix Cache `read_multi` with local_cache bug, should returns raw value, not `ActiveSupport::Cache::Entry` instance.
|
| | | | |
| | | | |
| | | | |
| | | | | |
It should returns raw value, not instance of `ActiveSupport::Cache::Entry`.
|
|/ / / / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since `Redis#call` duck types as a Proc, we'd call `#call` on it,
thinking it's a Proc. Fixed by check for the Proc explicitly instead of
duck typing on `#call`.
References #32233
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, URI.enscape could handle Unicode input (without any actual
escaped characters), or input with escaped characters (but no actual
Unicode characters) - not both.
URI.unescape("\xe3\x83\x90") # => "バ"
URI.unescape("%E3%83%90") # => "バ"
URI.unescape("\xe3\x83\x90%E3%83%90") # =>
# Encoding::CompatibilityError
We need to let `gsub` handle this for us, and then force back to the
original encoding of the input. The result String will be mangled if
the percent-encoded characters don't conform to the encoding of the
String itself, but that goes without saying.
Signed-off-by: Ashe Connor <ashe@kivikakk.ee>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Numeric#positive? and Numeric#negative? was added to Ruby since 2.3,
see https://github.com/ruby/ruby/blob/ruby_2_3/NEWS
Rails 6 requires Ruby 2.4.1+ since https://github.com/rails/rails/pull/32034
|
| | |
| | |
| | |
| | |
| | | |
Ruby 2.4+ provides `Hash#compact` and `Hash#compact!` natively,
so `active_support/core_ext/hash/compact` is no longer necessary.
|
| | |
| | |
| | |
| | | |
Since Rails 6 requires Ruby 2.4.1+.
|
| | |
| | |
| | |
| | |
| | | |
https://bugs.ruby-lang.org/issues/12752
https://ruby-doc.org/core-2.4.0/String.html#method-i-unpack1
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
correct value
Remove extra comments `# Asking for private method` in activesupport/test/core_ext/module_test.rb
Improve docs of using `delegate` with `:private`
Update changelog of #31944
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Fixes #31909.
Closes #31911.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some timezones like `Europe/London` have multiple mappings in
`ActiveSupport::TimeZone::MAPPING` so return all of them instead
of the first one found by using `Hash#value`. e.g:
# Before
ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh"]
# After
ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh", "London"]
Fixes #31668.
|
| | |
| | |
| | |
| | |
| | | |
This faithfully preserves grapheme clusters (characters composed of other
characters and combining marks) and other multibyte characters.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
```ruby
"foo".freeze.strip_heredoc.frozen? # => true
```
Fixes the case where frozen string literals would inadvertently become
unfrozen:
```ruby
foo = <<-MSG.strip_heredoc
la la la
MSG
foo.frozen? # => false !??
```
|
| | |
| | |
| | |
| | |
| | |
| | | |
Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug.
References #32028
|
| | |
| | |
| | |
| | | |
See https://github.com/ruby/ruby/blob/ruby_2_3/NEWS
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make sure that when transforming the keys of a HashWithIndifferentAccess
we can still access with indifferent access in Ruby 2.5.
Closes #32007.
|
| | |
| | |
| | |
| | |
| | | |
Some places we can't remove because Ruby still don't have a method
equivalent to strip_heredoc to be called in an already existent string.
|
|\ \ \
| | | |
| | | |
| | | | |
Add support for connection pooling on RedisCacheStore
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Without this require, an error occurs when executing only `duration_test.rb`.
Ref: https://travis-ci.org/rails/rails/jobs/338817558#L2205-L2210
|
|\ \ \ \
| |_|/ /
|/| | | |
Fix yaml deserialization of ActiveSupport::Duration
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This ensures the duration's @parts hash has a default value, to avoid this regression introduced in 5.1:
YAML.load(YAML.dump(10.minutes)) + 1 # => NoMethodError: undefined method `+' for nil:NilClass
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Closes #31886
Fixes #31884
|
|\ \ \ \
| |_|/ /
|/| | | |
Improve test for TaggedLogging "keeps each tag in their own thread"
|
| |\ \ \
| | | |/
| | |/| |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit ac74e2c521f6ddc0eac02d74a1313261bcc1d60f, reversing
changes made to ffdb06136152b3c5f7f4a93ca5928e16e755d228.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This suppresses `Timeout::Error` exceptions.
Ref: https://travis-ci.org/rails/rails/jobs/334622442#L1089-L1110
|
|\ \ \ \
| | | | |
| | | | | |
Fix infinite loop when unloading autoloaded modules
|
| | | | |
| | | | |
| | | | |
| | | | | |
error occured during the load.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
|/ / / /
| | | |
| | | |
| | | | |
config
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Support hash as first argument for `assert_difference`.
This allows to specify multiple numeric differences in the same assertion.
Example:
assert_difference 'Article.count' => 1, 'Notification.count' => 2 do
# post :create, params: { article: {...} }
end
* Support error message when passing a hash as a first parameter
* Format CHANGELOG properly
[Julien Meichelbeck + Rafael Mendonça França]
|
| | | | |
|