| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \
| | | | |
| | | | | |
Use consistent term `underscored`
|
|/ / / / |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use original `Array#sum` when calculating Numeric sum.
This commit is related #24804 issue.
Issue #24804 reports `Array#sum` becomes much slower when
ActiveSupport is included.
This commit tries to use original method as far as possible.
```shell
$ cat array_sum.rb
class Array
alias core_sum sum
end
require 'benchmark/ips'
require 'active_support/core_ext/enumerable'
ary = [1.0] * 1_000_000
Benchmark.ips do |x|
x.report("core sum") { ary.core_sum }
x.report("AS's sum") { ary.sum }
x.compare!
end
$ bundle exec ruby -v -I lib array_sum.rb
ruby 2.4.0dev (2016-05-01 master 54867) [x86_64-darwin14]
Calculating -------------------------------------
core sum 4.000 i/100ms
AS's sum 5.000 i/100ms
-------------------------------------------------
core sum 50.492 (± 7.9%) i/s - 252.000
AS's sum 50.116 (± 6.0%) i/s - 250.000
Comparison:
core sum: 50.5 i/s
AS's sum: 50.1 i/s - 1.01x slower
```
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
|
|\ \ \
| | | |
| | | | |
Followup to #24844
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
Some slight documentation edits and fixes. Also, run remove unnecessary
`RuntimeError`.
r? @arthurnn
|
| | |
| | |
| | |
| | |
| | | |
In #23935, cable file was to be provided by the javascript instead of coffeescript,
doc was also been modified to use javascript.
|
|\ \ \
| | | |
| | | | |
Replace `loop` to `until`
|
|/ / / |
|
|\ \ \
| | | |
| | | |
| | | | |
Preparing for 5.0.0.rc1 release
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
http --> https
|
| |/ / /
| | | |
| | | |
| | | | |
[ci skip]
|
|\ \ \ \
| |/ / /
|/| | | |
Helpers doc grammar fix [skip ci]
|
|/ / / |
|
| | |
| | |
| | |
| | | |
It is related with https://github.com/rack/rack/commit/7b66d2cdb80a4d6b44fa8c61d92e25fbbda1f152
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Refactor connection handler
|
| | | |
| | | |
| | | |
| | | | |
[skip ci]
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
ConnectionHandler will not have any knowlodge of AR models now, it will
only know about the specs.
Like that we can decouple the two, and allow the same model to use more
than one connection.
Historically, folks used to create abstract AR classes on the fly in
order to have multiple connections for the same model, and override the
connection methods.
With this, now we can override the `specificiation_id` method in the
model, to return a key, that will be used to find the connection_pool
from the handler.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In #18721 we removed the discard key from the session hash used to flash
messages and that broke compatibility with Rails 4 applications because they
try to map in the discarded flash messages and it returns nil.
Fixes #24726.
|
|\ \ \ \
| | | | |
| | | | | |
BoomerAPI is not used anywhere, so removed it!
|
| | |/ /
| |/| |
| | | |
| | | |
| | | | |
- It was originally added in 83b4e9073f0852afc065 and partially
removed in 05d89410bf97d0778e7.
|
|\ \ \ \
| | | | |
| | | | | |
Release notes: Add a note about `use_transactional_tests` in the deprecated section of Active Record notes [ci skip]
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
section of Active Record notes [ci skip]
- Followup of PR #19282.
|
|\ \ \ \
| | | | |
| | | | | |
Array#split refactoring for case with block
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Calculating -------------------------------------
before 26.319k i/100ms
after 29.414k i/100ms
-------------------------------------------------
before 350.623k (± 1.6%) i/s - 1.763M
after 416.227k (± 1.4%) i/s - 2.088M
Comparison:
after: 416226.8 i/s
before: 350622.8 i/s - 1.19x slower
|
|\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
rthbound/dont-call-each-when-calling-body-on-response
Dont call each when calling body on response to fix #23964
Fixes #23964
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- Adds #each_chunk to ActionDispatch::Response. it's a method which
will be called by ActionDispatch::Response#each.
- Make Response#each a proper method instead of delegating to @stream
- In Live, instead of overriding #each, override #each_chunk.
- `#each` should just spit out @str_body if it's already set
- Adds #test_set_header_after_read_body_during_action
to prove this fixes #23964
- Adds #test_each_isnt_called_if_str_body_is_written to
ensure #each_chunk is not called when @str_body is available
- Call `@response.sent!` in AC::TestCase's #perform so a test response
acts a bit more like a real response. Makes test that call `#assert_stream_closed`
pass again.
- Additionally assert `#committed?` in `#assert_stream_closed`
- Make test that was calling @response.stream.each pass again by
calling @response.each instead.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix failures due to transactions
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
test_migrate_clears_schema_cache_afterward test.
Disable transactions for this test.
Fixes #24391
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix broken links in 'Ruby on Rails 2.3 Release Notes' [ci skip]
|
| | | | | | | |
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In 5.0 we use bind parameters for limit and offset, while in 4.2 we used
the values directly. The code as it was written assumed that limit and
offset worked as `LIMIT ? OFFSET ?`. Both Oracle and SQL Server have a
different syntax, where the offset is stated before the limit. We
delegate this behavior to the connection adapter so that these adapters
are able to determine how the bind parameters are flattened based on
what order their specification has the various clauses appear.
Fixes #24775
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix link in 'Configuring Rails Applications' [ci skip]
|
|/ / / / / / |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix link in 'Ruby on Rails 3.0 Release Notes' [ci skip]
|
|/ / / / / / |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix markdown syntax in 'Ruby on Rails 2.2 Release Notes' [ci skip]
|