| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The exact inspect output of a BigDecimal is out of scope for what we're trying
to communicate about `dup` and `duplicable?` here.
Adding two examples distracts is disctracting, so keep the docs from before
since our minimal version is Ruby 2.2.2.
[ Koichi ITO, Jon Moss, Kasper Timm Hansen ]
This reverts commit 2163874dedaf83e67599c2930c2686caa165fbad, reversing
changes made to 46fdbc5290335ed38fa9fe2b6b0ef8abe4eccb1b.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Closes #27683.
Seeing a code sample that leads to what we're guarding against:
```ruby
Topic.update_counters(1, replies_count: 1, touch: [])
```
It doesn't look like a case people would ever intentionally end
up with. Thus we're better off sparing the conditional.
Note: it could happen if a method returns an empty array
that's then passed to `update_counters` and its touchy friends.
But `[].presence` can fix that once people see their query blow
up.
[ Eugene Kenny & Kasper Timm Hansen ]
|
|\ \ \
| | | |
| | | | |
remove unused require
|
| | |/
| |/|
| | |
| | | |
`InlineAdapter` is not used from 1f8558f.
|
|\ \ \
| | | |
| | | | |
Several representation of BigDecimal has changed in Ruby 2.4.0+ [ci skip]
|
| |/ /
| | |
| | |
| | | |
cf. https://github.com/ruby/bigdecimal/pull/42
|
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 66e5b9d3f47cd52143be0e6a216ade34bb52b9cc.
We're seeing some test failures in AR postgresql tests
|
| | |
| | |
| | |
| | | |
I see no reason not to use the newest stable version.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In #26672 we blocked use of Ruby keywords as identifiers for view
locals but inadvertently broke the use of instance variable names
as identifiers. Whilst not explicitly documented this behavior has
been around for a long time and there's no need to break it now.
Fixes #27480.
|
|\ \ \
| | | |
| | | | |
remove unnecessary addition of `lib`
|
| |/ /
| | |
| | |
| | |
| | | |
`TestTask` add `lib` directory by default.
Ref: https://github.com/ruby/rake/blob/master/lib/rake/testtask.rb#L39..L41
|
|\ \ \
| |/ /
|/| |
| | |
| | | |
kenta-s/fix-broken-example-code-in-output_safety_helper
Fix broken sample code in action_view/helpers/output_safety_helper.rb…
|
|/ / |
|
| | |
|
| |
| |
| |
| | |
instead, rewrite them to no-op
|
| |
| |
| |
| | |
call `super`
|
| |
| |
| |
| | |
in case String or any other ancestor class' respond_to_missing? was defined.
|
| | |
|
|\ \
| | |
| | | |
Add the touch option to ActiveRecord#increment! and decrement!
|
| | |
| | |
| | |
| | |
| | | |
Supports the `touch` option from update_counters.
The default behavior is not to update timestamp columns.
|
| | | |
|
| | |
| | |
| | |
| | | |
in case Array or any other ancestor class' respond_to_missing? was defined.
|
|\ \ \
| | | |
| | | | |
`type_condition` should be overwritten by `create_with_value` in `scope_for_create`
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`scope_for_create`
`type_condition` should be overwritten by `create_with_value`. So `type`
in `create_with_value` should be a string because `where_values_hash`
keys are converted to string.
Fixes #27600.
|
|\ \ \
| | | |
| | | | |
Small spelling error
|
|/ / /
| | |
| | | |
existing_acrnoyms -> existing_acronyms
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If a process is forked more than once, the pool was grabbing the oldest
spec, not the most recent spec. This wasn't noticed before because most
folks are lilely forking the process only once.
If you're forking the process multiple times however the wrong spec name
will be returned and an incorrect connection will be used for the
process.
This fixes the issue by reversing the list of spec names so we can grab
the most recent spec rather than the oldest spec.
|
|\ \ \
| | | |
| | | | |
CI against JRuby 9.1.7.0
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Fix missing bracket.
|
|/ / / /
| | | |
| | | | |
Fix missing left bracket in exception message.
|
|\ \ \ \
| |_|/ /
|/| | | |
Update builder gem to avoid deprecations of 2.4
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Fix grammar in asset_url_helper.rb [ci skip]
|
|/ / / |
|
|/ /
| |
| |
| |
| | |
See: https://github.com/ruby/ruby/commit/44a2576f798b07139adde2d279e48fdbe71a0148
https://github.com/ruby/ruby/commit/9df88e9cae57aa421230f14500e88f33f127414f
|
| |
| |
| |
| |
| |
| | |
it has some methods that override the accessors and calls the original accessors via `super`
this partially reverts 9360b6be63b7a452535699bcf6ae853df7f5eea7
|
| |
| |
| |
| |
| |
| | |
it has some methods that override the accessors and calls the original accessors via `super`
this partially reverts 9360b6be63b7a452535699bcf6ae853df7f5eea7
|
| |
| |
| |
| | |
because Struct.new returns a Class, we just can give it a name and use it directly without inheriting from it
|
|\ \
| | |
| | | |
Fix typo extention -> extension [ci skip]
|
|/ / |
|
|\ \
| | |
| | | |
fix method name in `Renderer` doc [ci skip]
|
|/ /
| |
| |
| | |
`ActionController::Renderer.defaults` was removed in 2db7304
|
| |
| |
| |
| |
| | |
The Numeric extensions like 1.day, 1.month, etc. shouldn't know
how the internals of ActiveSupport::Duration works.
|
| |
| |
| |
| |
| |
| |
| | |
Since 1.month no longer equals 30.days add some tests to ensure that
addition maintains the same day in the month or is the last day in
the month if the month has less days than the current day. Also add
a test for the behaviour of 12.months == 1.year.
|
| |
| |
| |
| | |
(I personally prefer writing one string in one line no matter how long it is, though)
|
| | |
|
|\ \
| | |
| | | |
Fix inconsistent parsing of Durations with both months and years
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
durations from code
ActiveSupport::Duration.parse('P3Y') == 3.years # It should be true
Duration parsing made independent from any moment of time:
Fixed length in seconds is assigned to each duration part during parsing.
Changed duration of months and years in seconds to more accurate and logical:
1. The value of 365.2425 days in Gregorian year is more accurate
as it accounts for every 400th non-leap year.
2. Month's length is bound to year's duration, which makes
sensible comparisons like `12.months == 1.year` to be `true`
and nonsensical ones like `30.days == 1.month` to be `false`.
Calculations on times and dates with durations shouldn't be affected as
duration's numeric value isn't used in calculations, only parts are used.
Methods on `Numeric` like `2.days` now use these predefined durations
to avoid duplicating of duration constants through the codebase and
eliminate creation of intermediate durations.
|