| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | | |
Passing 999999000 < `:nsec` < 999999999 and 999999 < `:usec` < 1000000
to change a time with utc_offset doesn't throw an `ArgumentError`.
|
|/ /
| |
| |
| | |
core_ext/time"
|
|\ \
| | |
| | | |
Replace use of alias chains with prepend at core_ext/date and core_ext/time
|
| | | |
|
| | |
| | |
| | |
| | | |
Allows fetching the same values from arrays as from ActiveRecord associations.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
* Rename `ActiveSupport::Try` => `ActiveSupport::Tryable`
* Include the modules inline
* `private` indentation
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`Delegator` inherits from `BasicObject`, which means that it will not
have `Object#try` defined. It will then delegate the call to the
underlying object, which will not (necessarily) respond to the method
defined in the enclosing `Delegator`.
This patches `Delegator` with the `#try` method to work around the
surprising behaviour.
Fixes #5790
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The feature was accepted and added to Ruby 2.3+ so we don't need to
define it again.
See https://bugs.ruby-lang.org/issues/11151
|
| | |
| | |
| | |
| | | |
By this way Integer, Rational, Float, Fixnum, Bignum classes have the same behaviour
|
| | | |
|
| | |
| | |
| | |
| | | |
Fixnum#zero?
|
|\ \ \
| | | |
| | | |
| | | | |
Amend `next_week` documentation [ci skip]
|
|/ / /
| | |
| | |
| | | |
[skip ci]
|
|/ / |
|
| |
| |
| |
| |
| | |
This was not clear on the API documentation that the method was
deprecated in a982a42d766169c2170d7f100c2a5ceb5430efb1.
|
|\ \
| | |
| | | |
add missing require for ArrayInquirer
|
| | | |
|
|\ \ \
| |/ /
|/| | |
[ci skip] Fix docs and guide about 'Array.wrap'
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a squash of the following commits, from first to last:
-
Fix minor, random things I’ve come across lately that individually
did not seem worth making a PR for, so I saved them for one commit.
One common error is using “it’s” (which is an abbreviation of “it is”)
when the possessive “its” should be used for indicating possession.
-
Changes include the name of a test, so remove the `[skip ci]` (thanks @senny).
-
Line wrap the changes at 80 chars and add one more doc fix.
-
Add a missing line wrap in the Contributing to Ruby on Rails Guide.
-
Line wrap the `TIP` section in the Contributing to Ruby on Rails Guide as well.
Rendering the guide locally with `bundle exec rake guides:generate` did
not show any change in on-screen formatting after adding the line wrap.
The HTML generated is (extra line added to illustrate where the line
wrap takes place):
<div class="info"><p>Please squash your commits into a single commit
when appropriate. This
simplifies future cherry picks and also keeps the git log
clean.</p></div>
-
Squash commits.
|
| | |
|
|\ \ |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
In dev, ActiveSupport::FileUpdateChecker#max_mtime triggers many
time comparisons. Time#to_time is quite a bit slower than not doing it,
so we should avoid it if possible.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 9420de59f5b7f5ceac77e28e6c326ec145f71f80.
Reason: Turns out we want to keep this method.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
We are promoting too much a feature that will not be widler used.
So for now lets keep just the ArrayInquirer constructor.
|
|\ \ \
| | | |
| | | |
| | | | |
Provide friendlier access to request variants
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Wrapping an array in an `ArrayInquirer` gives a friendlier way to check its
string-like contents. For example, `request.variant` returns an `ArrayInquirer`
object. To check a request's variants, you can call:
request.variant.phone?
request.variant.any?(:phone, :tablet)
...instead of:
request.variant.include?(:phone)
request.variant.any? { |v| v.in?([:phone, :tablet]) }
`Array#inquiry` is a shortcut for wrapping the receiving array in an
`ArrayInquirer`:
pets = [:cat, :dog]
pets.cat? # => true
pets.ferret? # => false
pets.any?(:cat, :ferret} # => true
|
| |/ /
|/| | |
|
|\ \ \
| |/ /
|/| |
| | |
| | | |
Conflicts:
guides/source/4_0_release_notes.md
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | | |
…as discussed #19413
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Thanks @fbernier for suggestion! <3
At this moment we can use Module#prepend in all all cases
except of Range because of the bug [1] in MRI 2.2
[1] https://bugs.ruby-lang.org/issues/10847
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
* Fix a few typos
* Wrap some lines around 80 chars
* Rephrase some statements
|
| | |
| | |
| | |
| | | |
(relates to #19157)
|
| | |
| | |
| | |
| | | |
[egilburg]
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | | |
tgxworld/reduce_allocated_memory_in_module_delegate
Reduce allocated memory for Module#delegate.
|