| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Fix and Improve sql logging coloration in `ActiveRecord::LogSubscriber`.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Improves coloring for statements like:
# Become WHITE
SELECT * FROM (
SELECT * FROM mytable FOR UPDATE
) ss WHERE col1 = 5;
LOCK TABLE table_name IN ACCESS EXCLUSIVE MODE;
# Becomes RED
ROLLBACK
- Reinstates the coloration of the `payload[:name]`.
Instead of simple alternating colors, adds meaning:
- `MAGENTA` for `"SQL"` or `blank?` payload names
- `CYAN` for Model Load/Exists
- Introduces specs for sql coloration.
- Introduces specs for payload name coloration.
GH#20885
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Add require to ensure Time#advance works without implicit required
|
| | |
| | |
| | |
| | | |
required
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
[ci skip] Add description about which object
|
| | | |
| | | |
| | | |
| | | | |
`ActiveSupport::Notifications.subscribe` expects as second parameter.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The problem existed where if your ArrayInquirer values were
strings but you checked them using any? with a symbol, it would
not find the value. Now it will correctly check whether both
the String form or the Symbol form are included in the Array.
`
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
user passed `options[:delimited_regex]` if available. Changed `DELIMITED_REGEX` to `DEFAULT)DELIMITED_REGEX` to signify what it means.
- Added tests for number to delimited and number to currency in both actionview and activesupport.
Changes
Changes
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When the autoload_paths start to grows, this methods is quite a hotspot
>> ActiveSupport::Dependencies.autoload_paths.size
=> 49
>> Benchmark.ips { |x| x.report('baseline') { ActiveSupport::Dependencies.loadable_constants_for_path(File.expand_path('app/models/shop')) }}
Calculating -------------------------------------
baseline 90.000 i/100ms
-------------------------------------------------
baseline 1.073k (±20.2%) i/s - 4.950k
After the patch
Calculating -------------------------------------
patched 883.000 i/100ms
-------------------------------------------------
patched 11.050k (±19.7%) i/s - 50.331k
|
| | | |
|
|\ \ \
| | | |
| | | | |
Added docs for TimeWithZone [ci skip]
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We have `caller_locations`, so we don't need to parse the strings in the
callstack.
|
| | | | |
|
| | | |
| | | |
| | | | |
`:nail_care:`
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
guides/source/security.md
|
| |\ \ \ \
| | | | | |
| | | | | | |
File renaming should be the last operation of an atomic write
|
| | | | | | |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
Correct cache store superclass in comment [ci skip]
|
| | | |/ / /
| | |/| | | |
|
| |\ \ \ \ \
| | |/ / / /
| |/| | | | |
Cleaned up generators tests using internal assertion helper
|
| | |/ / / |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The perf gain is relatively minor but consistent:
```
Calculating -------------------------------------
0.zero? 137.091k i/100ms
1.zero? 137.350k i/100ms
0 == 0 142.207k i/100ms
1 == 0 144.724k i/100ms
-------------------------------------------------
0.zero? 8.893M (± 6.5%) i/s - 44.280M
1.zero? 8.751M (± 6.4%) i/s - 43.677M
0 == 0 10.033M (± 7.0%) i/s - 49.915M
1 == 0 9.814M (± 8.0%) i/s - 48.772M
```
And try! is quite a big hotspot for us so every little gain is appreciable.
|
| | | | |
|
| |\ \ \
| | | | |
| | | | | |
Added helper methods to stub any instance
|
| | | | | |
|
| |\ \ \ \
| | | | | |
| | | | | | |
[ci skip] Documentation: Switch around a common phrase for readability
|
| | | | | | |
|
| | |/ / /
| |/| | | |
|
| | | | | |
|
| | | | | |
|
| |\ \ \ \
| | | | | |
| | | | | | |
Reload I18n.load_path in development
|
| | | | | | |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
[ci skip] Fix the AS::Callbacks terminator docs
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The second argument of the terminator lambda is no longer the result
of the callback, but the result lambda.
https://github.com/rails/rails/blob/3a7609e2bafee4b071fe35136274e6ccbae8cacd/activesupport/test/callbacks_test.rb#L553
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Using each_key is faster and more intention revealing.
Calculating -------------------------------------
each 31.378k i/100ms
each_key 33.790k i/100ms
-------------------------------------------------
each 450.225k (± 7.0%) i/s - 2.259M
each_key 494.459k (± 6.3%) i/s - 2.467M
Comparison:
each_key: 494459.4 i/s
each: 450225.1 i/s - 1.10x slower
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Discussion https://github.com/JuanitoFatas/fast-ruby/pull/59#issuecomment-128513763
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
cause issues if it is not idempotent
|
| |/ / / / |
|
| |\ \ \ \
| | | | | |
| | | | | | |
Fix the documentation of Hash#except method [ci skip]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
fix minor problems
|
| |/ / / / |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We can save a few objects by freezing the `replacement` string. We save a few more by down-casing the string in memory instead of allocating a new one. We save far more objects by checking for the default separator `"-"`, and using pre-generated regular expressions.
We will save 209,231 bytes and 1,322 objects.
|