| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/ / / |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
* 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
|
|\ \ \
| | | |
| | | |
| | | | |
Move Integer#positive? and Integer#negative? query methods to Numeric
|
| | | |
| | | |
| | | |
| | | | |
By this way Integer, Rational, Float, Fixnum, Bignum classes have the same behaviour
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix the guide to state that Rails uses Minitest as the default test
framework.
Remove unnecessary mention to Test::Unit from the API docs
('constantize' and 'safe_constantize').
|
| | | |
|
| | |
| | |
| | |
| | | |
Fixnum#zero?
|
| | |
| | |
| | |
| | |
| | |
| | | |
In Rails 4.0, json decoding relied on MultiJson. This changed from 4.1
forward since it reached its end of life, and this extra argument was
kept for compatibility. We are safe to remove it now.
|
|\ \ \
| | | |
| | | |
| | | | |
Amend `next_week` documentation [ci skip]
|
|/ / /
| | |
| | |
| | | |
[skip ci]
|
| | | |
|
|\ \ \
| | | |
| | | | |
refactor ActiveSupport::TestCase.test_order method with memoization
|
| |/ / |
|
|/ /
| |
| |
| |
| |
| | |
* Fix a few typos
* Wrap lines to 80 chars
* Use `+` instead of `<tt>`
|
| |
| |
| |
| | |
[Dave Moore]
|
|\ \
| | |
| | | |
[ci skip] Update ActiveSupport::Subscriber documentation
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Improve ActiveSupport::TimeWithZone conversion to YAML
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously when converting AS::TimeWithZone to YAML it would be output
as a UTC timestamp. Whilst this preserves the time information accurately
it loses the timezone information. This commit changes that so that it is
saved along with the time information. It also provides nicer encoding of
AS::TimeZone instances themselves which previously embedded all of the
data from the TZInfo records.
Fixes #9183.
|
|\ \ \ \
| |/ / /
|/| | | |
Clearify that alias_method_chain is deprecated
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This was not clear on the API documentation that the method was
deprecated in a982a42d766169c2170d7f100c2a5ceb5430efb1.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Make strptime behave more like parse when components are missing and
share behavior between the two methods.
|
|/ / /
| | |
| | |
| | | |
This makes it easier to parse user-inputted times as from a given time zone.
|
|\ \ \
| | | |
| | | | |
MRI compatible code for ActiveSupport::Testing::Isolation::Subprocess
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
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.
|
| | | |
|
|\ \ \ |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently `Rails.cache.clear` raises Errno::ENOENT if it's run just
after cloning a new Rails project. It should succeed without removing
files or directories.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This make the config/initializers run before the railties are loaded
what can break some configurations.
|
|\ \ \ \
| | | | |
| | | | | |
Raise ArgumentError if an unrecognised callback is skipped
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
At present, if you skip a callback that hasn't been defined,
activesupport callbacks silently does nothing. However, it's easy to
mistype the name of a callback and mistakenly think that it's being
skipped, when it is not.
This problem even exists in the current test suite.
CallbacksTest::SkipCallbacksTest#test_skip_person attempts to skip
callbacks that were never set up.
This PR changes `skip_callback` to raise an `ArgumentError` if the
specified callback cannot be found.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Fix AS::Callbacks raising an error when `:run` callback is defined.
|
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit 796cab45561fce268aa74e6587cdb9cae3bb243e.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
https://github.com/ruby/ruby/pull/579 - there is a new optimization
since ruby 2.2
Previously regexp patterns were faster (since a string was converted to
regexp underneath anyway). But now string patterns are faster and
better reflect the purpose.
Benchmark.ips do |bm|
bm.report('regexp') { 'this is ::a random string'.gsub(/::/, '/') }
bm.report('string') { 'this is ::a random string'.gsub('::', '/') }
bm.compare!
end
# string: 753724.4 i/s
# regexp: 501443.1 i/s - 1.50x slower
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | | |
|