| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
[ci skip]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, an autoloaded constant `HTML::SomeClass` would not be marked
as autoloaded by AS::Dependencies. This is because the
`#loadable_constants_for_path` method uses `String#camelize` on the
inferred file path, which in turn means that, unless otherwise directed,
AS::Dependencies watches for loaded constants in the `Html` namespace.
By passing the original qualified constant name to `#load_or_require`,
this inference step is avoided, and the new constant is picked up in the
correct namespace.
|
|
|
|
| |
String#gsub(pattern, '')
|
|
|
|
| |
That is a better name, thanks @jeremy.
|
| |
|
|
|
|
| |
See the CHANGELONG message in the patch for further details.
|
| |
|
|
|
|
|
|
| |
Use a lambda to ensure that the generated string respects the offset of
the time value. Also add DateTime#to_s(:iso8601) and Date#to_s(:iso8601)
for completeness.
|
|
|
|
| |
for easy Javascript date parsing
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ActiveSupport::Cache::MemoryStore
Previously, the cache size of `ActiveSupport::Cache::MemoryStore` was calculated
as the sum of the size of its entries, ignoring the size of keys and any data
structure overhead. This could lead to the calculated cache size sometimes being
10-100x smaller than the memory used, e.g., in the case of small values.
The size of a key/entry pair is now calculated via `#cached_size`:
def cached_size(key, entry)
key.to_s.bytesize + entry.size + PER_ENTRY_OVERHEAD
end
The value of `PER_ENTRY_OVERHEAD` is 240 bytes based on an [empirical
estimation](https://gist.github.com/ssimeonov/6047200) for 64-bit MRI on
1.9.3 and 2.0.
Fixes GH#11512 https://github.com/rails/rails/issues/11512
|
|
|
|
|
|
|
|
|
| |
This fixes situations where nested NoMethodError exceptions are masked
by delegations. This would cause confusion especially where there was a
problem in the Rails booting process because of a delegation in the
routes reloading code.
Fixes #10559
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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`
|
| |
|
| |
|
|\
| |
| | |
Remove deprecated `Time` methods
|
| |
| |
| |
| | |
and `Time#local_time` in favour of `Time#utc` and `Time#local`
|
|/
|
|
| |
according to http://guides.rubyonrails.org/api_documentation_guidelines.html#english
|
|
|
|
|
| |
If you're using it to compare hashes for the purpose of testing,
please use MiniTest's assert_equal instead.
|
| |
|
| |
|
|
|
|
| |
Use native Array#uniq and Array#uniq! instead.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
| |
Add `DateTime#usec` and `DateTime#nsec` so that `ActiveSupport::TimeWithZone`
keeps sub-second resolution when wrapping a `DateTime` value.
Fixes #10855
|
|
|
|
|
|
|
|
|
|
|
|
| |
ActiveSupport::Dependencies::Loadable
It is possible under some environments to receive an Exception that is
not extended with Blamable (e.g. JRuby).
ActiveSupport::Dependencies::Loadable#load_dependency blindly call
blame_file! on the exception which throws it's own NoMethodError
exception and hides the original Exception.
This commit fixes #9521
|
|
|
|
|
|
|
| |
Time.at allows passing a single Time argument which is then converted
to an integer. The conversion code since 1.9.3r429 explicitly checks
for an instance of Time so we need to override it to allow DateTime
and ActiveSupport::TimeWithZone values.
|
| |
|
| |
|
|
|
|
| |
[ci skip]
|
|
|
|
| |
[ci skip]
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
U+2028 and U+2029 are allowed inside strings in JSON (as all literal
Unicode characters) but JavaScript defines them as newline
seperators. Because no literal newlines are allowed in a string, this
causes a ParseError in the browser. We work around this issue by
replacing them with the escaped version. The resulting JSON is still
valid and can be parsed in the browser.
This commit has been coauthored with Viktor Kelemen @yikulju
|
| |
|
|
|
|
|
| |
Add a simple API for fetching a list of entries from the cache, where
any missing entries are computed by a supplied block.
|
| |
|
|
|
|
| |
[ci skip]
|
|\
| |
| | |
Fixes skipping object callback filters
|