| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Rails 5.2, when compression is enabled (which it is by default),
the actual value being written to the underlying storage is actually
_bigger_ than the uncompressed raw value.
This is because the `@marshaled_value` instance variable (typically)
gets serialized with the entry object, which is then written to the
underlying storage, essentially double-storing every value (once
uncompressed, once possibly compressed).
This regression was introduced in #32254.
|
|
|
|
|
| |
Because this class includes not only `assert_difference` but also tests
of other assertion methods.
|
| |
|
|
|
|
|
|
|
|
| |
If you have a regular test that have a teardown block, and for any reason an exception get raised, ActiveSupport will not run subsequent after_teardown method provided by other module or gems.
One of them being the ActiveRecord::TestFixtures which won't rollback the transation when the test ends making all subsequent test to be in a weird state.
The default implementation of minitest is to run all teardown methods from the user's test, rescue all exceptions, run all after_teardown methods provided by libraries and finally re-raise the exception that happened in the user's teardown method.
Rails should do the same.
|
|
|
|
|
|
| |
73e7aab behaved as expected on codeship, failing the build with
exactly these RuboCop violations. Hopefully `rubocop -a` will
have been enough to get a passing build!
|
|
|
|
|
|
|
|
| |
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.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|