| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Fix Hash#deep_merge bug and improve documentation — resolves #12738
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously merging into a hash with a falsy value would not result in
the merge-block being called. The fix is simply to check for presence
of the key in the hash.
The documentation example for `deep_merge` now appropriately
demonstrates what a deep merge does.
|
| | |
|
|\ \
| | |
| | | |
[Fixes #14948] Hash#to_query: right serialization for empty hash and array
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
are serialized
Empty Hash or Array should not present in serialization result
{a: []}.to_query # => ""
{a: {}}.to_query # => ""
For more info see #14948.
|
|/ /
| |
| |
| | |
test case.
|
|\ \
| | |
| | | |
Fix inconsistent behavior from String#pluralize
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Before:
When calling String#pluralize with count=1 then it returned same
string, but with count other than 1, returned new string.
After:
String#pluralize always return a new string.
=> Prevent mutation of a string inadvertently.
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| | |
While calling String#first or String#last with zero or a Fixnum < the
string's length returns a new string, a Fixnum >= the string's length
returns the string itself. This inconsistency can lead to inadvertent
mutation of a string.
|
|\ \ |
|
| | |
| | |
| | |
| | | |
[ci skip]
|
| | |
| | |
| | |
| | | |
[ci skip]
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
1. Improve tests
2. Remove unnecessary constant
3. Add docs for BigDecimal#duplicable?
|
|\ \ \
| | | |
| | | | |
Improve debugging support
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Auto-generate stable fixture UUIDs on PostgreSQL
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/fixtures.rb
activerecord/test/cases/adapters/postgresql/uuid_test.rb
activesupport/CHANGELOG.md
|
| | | |
| | | |
| | | |
| | | | |
Fixes: #11524
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change to require all active_support/deprecation since that's the actual
entry point for the deprecation methods.
|
| | | | |
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
Make `#prepend` method modify instance in-place and return self
instead of just returning modified value. That is exactly what
`#prepend!` method was doing previously, so it's deprecated from
now on.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Conflicts:
activesupport/lib/active_support/core_ext/hash/conversions.rb
|
| | |
| | |
| | |
| | | |
requires. Appropriate to keep this, users don't care that the implementation got unified.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
good, but the closer relationship to #presence over #present is ultimately worth it
|
| | | |
|
|\ \ \
| | | |
| | | | |
Add note to silence_stream and quietly. [skip ci]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
State that on the doc.
[fixes #11954]
|
|/ / / |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
guides/source/active_record_validations.md
guides/source/api_documentation_guidelines.md
guides/source/configuring.md
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This was backported for Ruby 1.8 support and is no longer needed.
Signed-off-by: David Celis <me@davidcel.is>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Rails currently provides an extension to BigDecimal that redefines how
it is serialized to YAML. However, as noted in #12467, this does not
work as expected. When ActiveSupport is required, BigDecimal YAML
serialization does not maintain the object type. It instead ends up
serializing the number represented by the BigDecimal itself which, when
loaded by YAML later, becomes a Float:
```ruby
require 'yaml'
require 'bigdecimal'
yaml = BigDecimal('13.37').to_yaml
YAML.load(yaml).class
require 'active_support/all'
yaml = BigDecimal('13.37').to_yaml
YAML.load(yaml).class
```
@tenderlove posits that we should deprecate the custom BigDecimal
serialization and let Ruby handle it. For the time being, users who
require this serialization for backwards compatibility can manually
`require 'active_support/core_ext/big_decimal/yaml_conversions'`.
This will close #12467 and deprecate the custom BigDecimal#to_yaml.
Signed-off-by: David Celis <me@davidcel.is>
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
sup haters
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change breaks tests in activesupport/test/core_ext/module_test.rb:
* test_delegation_exception_backtrace
* test_delegation_exception_backtrace_with_allow_nil
This reverts commit 0167765e3f84260522bc2f32d926c1f5dd44957c.
|
| | | |
| | | |
| | | |
| | | | |
any line number maths
|
|\ \ \ \
| | | | |
| | | | | |
[ci skip] Grammar correction
|
| | | | | |
|