| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
```ruby
Benchmark.ips do |x|
x.report("$&") {
"foo".gsub(/f/) { $&.hex }
}
x.report("block var") {
"foo".gsub(/f/) { |match| match.hex }
}
end
```
```
Calculating -------------------------------------
$& 23.271k i/100ms
block var 24.804k i/100ms
-------------------------------------------------
$& 321.981k (± 7.4%) i/s - 1.606M
block var 324.949k (± 9.2%) i/s - 1.612M
```
|
|\ \
| | |
| | |
| | | |
Improve Test Runner's Minitest integration.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This also adds free mix and matching of directories, files and lines filters.
Like so:
bin/rails test models/post_test.rb test/integration models/person_test.rb:26
You can also mix in a traditional Minitest filter:
bin/rails test test/integration -n /check_it_out/
|
| | |
| | |
| | |
| | | |
[Robin Dupret & Shunsuke Aida]
|
|\ \ \
| | | |
| | | | |
[ci skip] Fix `thoughtbot` capitalization
|
| | | |
| | | |
| | | |
| | | |
| | | | |
The company name is spelled `thoughtbot` per
https://github.com/thoughtbot/presskit/blob/master/README.md#name
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
ActiveSupport::TimeWithZone references `ActiveSupport::Duration` but
does not require it, which can result in a `LoadError` when required
directly without requiring a component less granular like
`active_support/time`, where the autoload for `ActiveSupport::Duration`
is set up.
|
|\ \ \
| | | |
| | | | |
Use block variable instead of global
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
```ruby
require 'benchmark/ips'
Benchmark.ips do |x|
x.report("$&") {
"foo".sub(/f/) { $&.upcase }
}
x.report("block var") {
"foo".sub(/f/) {|match| match.upcase }
}
end
```
```
Calculating -------------------------------------
$& 48.658k i/100ms
block var 49.666k i/100ms
-------------------------------------------------
$& 873.156k (± 9.3%) i/s - 4.331M
block var 969.744k (± 9.2%) i/s - 4.818M
```
It's faster, and gets rid of a few "magic" global variables
|
|\ \ \ \
| | | | |
| | | | | |
Allow Enumerable#pluck to take a splat.
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | | |
This allows easier integration with ActiveRecord, such that
AR#pluck will now use Enumerable#pluck if the relation is loaded,
without needing to hit the database.
|
|\ \ \ \
| | | | |
| | | | | |
Deprecate `assert_template` and `assigns()`.
|
| | |/ /
| |/| | |
|
|/ / /
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Added multibyte slice! example to doc [ci skip]
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Add bang version to OrderedOptions
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
By:
Aditya Sanghi(@asanghi)
Gaurish Sharma(gaurish)
|
| | | | | |
|
|\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | | |
Remove `.superclass_delegating_accessor`.
|
| |/ / / |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Add documentation for Deprecation::Behavior module
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add documentation for DeprecatedConstantProxy#class
|
| |/ / / / |
|
| |/ / /
|/| | |
| | | |
| | | | |
[ci skip]
|
|\ \ \ \
| | | | |
| | | | | |
Add nodoc label for protected Cache methods
|
| |/ / / |
|
|\ \ \ \
| | | | |
| | | | | |
Update documentation for MemCacheStore::build_mem_cache [ci skip]
|
| |/ / / |
|
|\ \ \ \
| | | | |
| | | | | |
Update documentation for ArrayInquirer#any?
|
| |/ / / |
|
|/ / / |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
* 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?
|