| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
The standard Ruby behavior for Time.at is to return the same type of
time when passing an instance of Time as a single argument. Since the
an ActiveSupport::TimeWithZone instance may be a different timezone than
the system timezone and DateTime just understands offsets the best we
can do is to return an instance of Time with the correct offset.
Fixes #11350.
|
|
|
|
|
|
|
|
| |
When Time.at_with_coercion (wraps Time.at) is called with a single
argument that "acts_like?(:time)" it is coerced to integer thus losing
it's microsecond percision.
This commits changes this to use `#to_f` to prevent the problem
|
| |
|
|
|
|
|
| |
Hash#select! returns nil if the hash didn't change and thus behaves differently
from select, so it's return value can't be used as result for the latter.
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit d108672dada7ba97d3b3b56f0c6001cea621061e.
Conflicts:
activesupport/CHANGELOG.md
|
| |
|
| |
|
| |
|
|
|
| |
core extensions (`core_ext/string/encoding`).
|
|
|
| |
in favor of `Module#local_constants`
|
| |
|
| |
|
|
|
|
| |
and `Time#local_time` in favour of `Time#utc` and `Time#local`
|
|
|
|
|
| |
If you're using it to compare hashes for the purpose of testing,
please use MiniTest's assert_equal instead.
|
|\
| |
| | |
Use symbols instead of strings in ActiveSupport::Concern
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ActiveSupport::Concern is used all over Rails
This PR will only create 3 new objects as keys are never recreated and
are not subject to garbage collection.
The strings were being uniquely created and garbage collected. I don't
have any performance numbers but this should be better than all of the
GC.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Use native Array#uniq and Array#uniq! instead.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Commit cfa35c55bb38b27af305ad21408e181bc3cd739e removed the
buffered_logger from AS, which required the logger file. Now we need to
add the proper require here.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In #11195 I noticed a trailing comma in the docs, but I decided to
further clean it up.
What I have done:
* Clean up the trailing comma in the docs and some extra whitespace
lines.
* Used `Array#extract` options to factor the repetitive pattern of
`args.last.is_a(Hash) ? ...`
* Renamed the local var `config` to `options` in `define_callbacks`, as
`options` seems to be the de facto name for the options objects.
* Renamed the local var `l` to `line` in `define_callback` (maybe it
meant `lambda` in the context) as single `l` may look like `1` in some
fonts.
|
| |
| |
| |
| |
| |
| |
| | |
_ Rename the define_callbacks params to `names`
- in order to match the naming conventions for `get_callbacks` and `set_callbacks` at https://github.com/rails/rails/blob/master/activesupport/lib/active_support/callbacks.rb#L736-743
- `define_callbacks` just register names(events), not define the real callback functions.
- Rename the `reset_callbacks` params
|
| |
| |
| |
| | |
The change is commited at ba552764344bc0a3c25b8576ec11f127ceaa16da
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Create DelegationError class
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Conflicts:
guides/source/layout.html.erb
|
| | | |
| | | |
| | | | |
Since 920753f, double assignment isn't used anymore
|
|\ \ \ \
| | | | |
| | | | | |
Remove unnecessary require from active_support/inflector/methods.rb
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
`active_support/inflections` already requires
`active_support/inflector/inflections`. There's no need to require it in
`active_support/inflector/methods`.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Change to destructive `deep_symbolize_keys` to avoid a new hash creation.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
https://github.com/rails/rails/commit/df24b8790f22384a068fece7042f04ffd2fcb33e which allows to do so. This helps to avoid extra hash object creation, by symbolizing inplace
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The previous implementation of BacktraceSilencer#noise did not
work correctly if more than one silencer was configured --
specifically, it would only return noise which was matched by all
silencers.
The new implementation is such that anything that has been matched by
silencers is removed from the backtrace using Array#- (array
difference), ie. we now return all elements within a backtrace that
have been matched by any silencer (and are thus removed by #silence).
Fixes #11030.
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
We need to check exception name to be nil
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We need to return Regexp.escape(camel_cased_word)
if the split is blank.
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
HashWithIndifferentAccess#select working as intended
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Before this commit, #reject returned a HashWithIndifferentAccess,
whereas #select returned a Hash. Now #select also returns a
HashWithIndifferentAccess.
|
|\ \ \ \ \ \ \
| |_|_|_|/ / /
|/| | | | | | |
Fix #10932. Treat "" and "::" as invalid on constantize
|
| | | | | | | |
|