| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Before this change missing timezone data for any of the time zones
defined in `ActiveSupport::Timezone::MAPPING` caused a `comparison of
NilClass with ActiveSupport::TimeZone failed` exception.
Attempting to get a timezone by passing a number/duration to `[]` or
calling `all` directly will try to sort sort the values of `zones_map`.
Those values are initialized by the return value of `create(zonename)`
which returns `nil` if `TZInfo` is unable to find the timezone
information.
In our case the exception was triggered by an outdated tzdata package
which did not include information for the "recently" added time zones.
Before 078421bacba178eac6a8e607b16f3f4511c5d72f `zones_map` only
returned the information that have been loaded into `@lazy_zone_map`
which ignored time zones for which the data could not be loaded, this
change restores the previous behaviour.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Namespace not working in RedisCacheStore#clear method. Bacause
namespace = merged_options(options)[namespace]
is always nil, Correct is
namespace = merged_options(options)[:namespace]
|
|\ \ \ \
| | | | |
| | | | | |
Don't doc _original_sum_with_required_identity
|
| | | | |
| | | | |
| | | | |
| | | | | |
It's not public API so don't document it.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Fix ActiveSupport::Cache compression
|
| | | | |
| | | | |
| | | | |
| | | | | |
(See previous commit for a description of the issue)
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
teddywing/active-support-cache-store--fix-end-tag-in-read-method-documentation
Cache::Store#read: Fix fixed-width end tag in docs
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* Fix the ending `</tt>` tag for `:expires_in`. Otherwise, the "or" is
set in fixed-width also.
* Re-wrap paragraph to 80 columns.
[ci skip]
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Define callbacks on descendants.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Addresses feedback from https://github.com/rails/rails/pull/31913#issuecomment-365983580
|
| | | | |
| | | | |
| | | | |
| | | | | |
We set callbacks on all descendants, so we need to make sure that they are also defined on all descendants as well.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
[ci skip]
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Change temporary file name extension while editing encrypted file.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
To have syntax highlighting in an editor try to preserve original extension of edited file.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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 revision 62897 https://github.com/ruby/ruby/commit/234a30459cdae6aa7da6e28a1082d9c11f315696
|
| |/ / / / /
|/| | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When upgrading to Rails 5.2 we're seeing
`ActiveSupport::Cache::Entry#compress` and
`ActiveSupport::Cache::Entry#should_compress?` as the highest usage of
our CPU. At least some part of this is coming from the fact that objects
are being marshaled multiple times. This memoizes the marshaled value to
eliminate half the problem.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We test the failing case we're trying to patch; only if it throws an
Exception do we patch.
Currently this will *always* throw, but upstream Ruby has patched this
bug: https://git.io/vAxKB
Signed-off-by: Ashe Connor <ashe@kivikakk.ee>
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
URI.unescape "extension" fails with Unicode input
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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>
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We have a bunch of documentation in
lib/active_support/core_ext/object/json.rb which is currently appearing
as documentation for the top-level ActiveSupport module. We hide it
from rdoc here.
Signed-off-by: Ashe Connor <ashe@kivikakk.ee>
|
| |/ / /
|/| | |
| | | |
| | | |
| | | | |
Now we always have a terminator, so we don't need to day the options
only make sense when the `:terminator` options is specified.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Convert the user to atheism by ditching the extra example that demonstrates
the same thing as date_of_birth.
Demonstrate the NoMethodError on date_of_birth first, then call age that
uses date_of_birth internally. Thus showing that accessing it publicly fails,
but using it internally succeeds.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | | |
|
| | | |
| | | |
| | | | |
Since #32034, Rails 6 requires Ruby 2.4.1+.
|
|\ \ \ \
| | | | |
| | | | | |
Correct method documentation
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The callback parameters need to reflect changes after
https://github.com/rails/rails/pull/28800
|
|/ / / /
| | | |
| | | |
| | | |
| | | | |
Fixes #31909.
Closes #31911.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We should call methods with `.method_name` not `::method_name`. Fix two
instances of `YAML::load` I found in favor of `YAML.load`.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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 !??
```
|
| | | |
| | | |
| | | | |
Fixes typos
|