| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Reduce Duration#inspect to a single series of transformations
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* eliminates need for temp Hash
Also added a couple of examples to DurationTest to specify:
* duration can be defined with units out of order e.g.
1.month + 1.year + 1.second + 1.day
* equality with a Fixnum works regardless of which operand is on which
side of the operator
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Revert fixes
|
| | |_|_|_|/ /
| |/| | | | |
| | | | | | |
| | | | | | | |
see c48cbb02d7e6f585e31b404c0c363f0d6b586811
|
| | | | | | | |
|
|/ / / / / / |
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
[JRuby] Skip few of the ActiveSupport's inflector test cases
Conflicts:
activesupport/test/abstract_unit.rb
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
|/ / / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Conflicts:
actionview/README.rdoc
activerecord/lib/active_record/migration.rb
guides/source/development_dependencies_install.md
guides/source/getting_started.md
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit 70d6e16fbad75b89dd1798ed697e7732b8606fa3, reversing
changes made to ea4db3bc078fb3093ecdddffdf4f2f4ff3e1e8f9.
Seems to be a code merge done by mistake.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
String#gsub(pattern, '')
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
That is a better name, thanks @jeremy.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
See the CHANGELONG message in the patch for further details.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This change is similar to #11736 & in same way switched with fixed string & the index of the hash for method name. the index was added because otherwise, ruby will raise Error.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We need to call `in_time_zone` to test that it isn't modifying the receiver
but since the variable isn't used it raises a warning so add an assertion
to make Ruby think it's being used.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When we call define_method with non-english chars like ¿por qué? it
errors out on JRuby as of 1.7.4 & would leave out the following error
invalid byte sequence in US-ASCII
To work around this issue, I have switched to define_test method call
define method with fixed string & the index of the hash. the index was
added because otherwise, ruby will raise method redefined warning.
As far as I can see there are no side-effect of this change for
other implementations. For readbility I have added a message to
asssert_equal informing for which word/phase the test has passed.
Before this Change:
JRuby:
Tests terminated suddenly with an error. no reported of Failues
or errors
MRI:
All Green.
After this Change,
JRuby:
the `ActiveSupport` TestsSuite gracefully fails with report at the end which test failed & why.
MRI:
All Green(no change)
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Similar implementations of #in_time_zone exists for Date, Time and DateTime so
method is extracted into its own module. Also some logic is extracted into
private method.
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Added Time#middle_of_day method
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Added middle_of_day method to Date and DateTime
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Restore default ActiveSupport::XmlMini.backend after tests
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
[Fixes #11512] improves cache size calculation in MemoryStore
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Rails 4.0.0 fails when trying to encode an ActiveSupport::TimeWithZone
that wraps a DateTime instance. This is fixed on master so add a test
to prevent regression.
(cherry picked from commit ad01b8da354268cebfae1519c28d19d75576ccb1)
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | | |
depreciation removed
|
| | | | |
| | | | |
| | | | | |
core extensions (`core_ext/string/encoding`).
|
| | | | |
| | | | |
| | | | |
| | | | | |
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 native Array#uniq and Array#uniq! instead.
|
| | | | | |
|
| | | | | |
|