| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Update String#camelize to provide feedback when a wrong option is sent
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
String#camelize was returning nil without any feedback when an
invalid option was passed as parameter. This update makes the method
to raises an ArgumentError when the option passed is invalid, similar
to what Ruby does for String#downcase (and others) in 2.4.1.
https://ruby-doc.org/core-2.4.1/String.html#method-i-downcase
|
|\ \
| | |
| | | |
Use File::NULL instead of "/dev/null"
|
| |/ |
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rails 5.1 introduce an `ActiveSupport::Duration::Scalar` class as
a wrapper around a numeric value as a way of ensuring a duration
was the outcome of an expression. However the implementation was
missing support for modulo operations. This commit adds support
for those operations and should result in a duration being
returned from expressions involving them.
Fixes #29603 and #29743.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
PR #29163 introduced a change in behavior when a duration was
the denominator in a calculation - this was incorrect as dividing
by a duration should always return a `Numeric`. The behavior of
previous versions of Rails has been restored.
Fixes #29592.
|
| |
| |
| |
| | |
Signed-off-by: Yuki Nishijima <yk.nishijima@gmail.com>
|
| |\
| | |
| | | |
Fix test failure in message verifier tests
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Without this, I get the following result on my machine
```
# Running:
F
Failure:
MessageVerifierTest#test_backward_compatibility_messages_signed_without_metadata [/home/deivid/Code/rails/activesupport/test/message_verifier_test.rb:91]:
--- expected
+++ actual
@@ -1 +1 @@
-{:some=>"data", :now=>2010-01-01 00:00:00 +0100}
+{:some=>"data", :now=>2010-01-01 00:00:00 +0000}
bin/test test/message_verifier_test.rb:89
```
|
| |/ |
|
| |\
| | |
| | | |
Remove time stubs after each test
|
| | |
| | |
| | |
| | | |
Reverts 7abb6e0.
|
| | | |
|
| | | |
|
| |\ \
| | | |
| | | | |
Fix HashWithIndifferentAccess#default when include?(nil)
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The implementation of HashWithIndifferentAccess#default didn't
distinguish `default` from `default(nil)`, which caused an incorrect
result for `default` if `nil` was used as a key.
Define HashWithIndifferentAccess#dig so that hackery that behaves
differently from Hash#default can be removed from
HashWithIndifferentAccess#default.
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We have some indentation cops. But now there is a little inconsistent
params indentations. Enable `Layout/FirstParameterIndentation` cop to
prevent newly inconsistent indentation added and auto-correct to
existing violations.
|
| | |/ |
|
| | | |
|
| | | |
|
|\ \ \
| | |/
| |/| |
|
| | |
| | |
| | |
| | | |
Time.now` (#29681)
|
| |\ \
| | | |
| | | | |
Use frozen-string-literal in ActiveSupport
|
| | | | |
|
| |\ \ \
| | | | |
| | | | | |
Mention Time.zone.parse possibly throwing ArgumentError
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
```
/Users/kamipo/src/github.com/rails/rails/activesupport/test/core_ext/module_test.rb:402: warning: `*' interpreted as argument prefix
/Users/kamipo/src/github.com/rails/rails/activesupport/test/core_ext/module_test.rb:420: warning: `*' interpreted as argument prefix
```
|
| |\ \ \ \
| | |_|/ /
| |/| | |
| | | | | |
Return prefixed method names from `Module.delegate`, if using prefixes
|
| |/ / /
| | | |
| | | |
| | | | |
if using prefix version.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| |\ \ \
| | | | |
| | | | |
| | | | | |
Enforce frozen string in Rubocop
|
| | | | | |
|
| |\ \ \ \
| | |/ / /
| |/| | |
| | | | | |
Make ActiveSupport frozen-string-literal friendly.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The ActiveSupport test suite only passes currently if it uses the latest unreleased commits for dalli, and a patch for Builder:
https://github.com/tenderlove/builder/pull/6
Beyond that, all external dependencies (at least, to the extent they’re used by ActiveSupport) are happy, including Nokogiri as of 1.8.0.
|
| |/ / / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
No need to pass `#cleanup` options through to `LocalCache#clear`.
Fixes #29081. References #25628.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Split up the caching tests as prep for adding a new cache store. Slices
the mega test/caching_test.rb into behavior modules, concrete store
tests, and cross-cutting store tests.
Considering moving cache store behavior modules into lib/ so they may be
used for acceptance testing by third parties.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Rails.cache.write_multi foo: 'bar', baz: 'qux'
Plus faster `fetch_multi` with stores that implement `write_multi_entries`.
Keys that aren't found may be written to the cache store in one shot
instead of separate writes.
The default implementation simply calls `write_entry` for each entry.
Stores may override if they're capable of one-shot bulk writes, like
Redis `MSET`.
|
| | | | |
|
|\| | | |
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since `CurrentAttributesTest` changed the global time zone, it is
necessary to restore the original value after changing the test.
The reproduction step:
```
./bin/test -w --seed 5549 test/current_attributes_test.rb test/core_ext/date_ext_test.rb
```
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Allow a default value to be declared for class_attribute
* Convert to using class_attribute default rather than explicit setter
* Removed instance_accessor option by mistake
* False is a valid default value
* Documentation
|
|\ \ \
| | | |
| | | | |
round before calculating exponent in number_to_human_converter
|
| | | |
| | | |
| | | |
| | | | |
fixes #25664
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
EilisHamilton/fix_uncountable_pluralization_locale
Fix pluralization of uncountables when given a locale
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Previously apply_inflections would only use the :en uncountables
rather then the ones for the locale that was passed to pluralize or
singularize.
This changes apply_inflections to take a locale which it will use to
find the uncountables.
|