I believe what Xavier means is that you need to demonstrate at the
places where you would do the replacement that the speed up is worth
the readability cost. If on a single request, that code executes once,
it's probably not noticeable. That's why in the benchmark you need to
run it 100 million tim
That makes sense. Thank you for pointing out. Do you have a suggestion how
to improve it? Could you open a pull request?
On sex, 6 de mai de 2016 at 06:46 Rodrigo Rosenfeld Rosas <
rr.ro...@gmail.com> wrote:
> Here is the relevant section in the changelog, I think:
>
> https://github.com/rails/rai
Thanks for your feedback.
Yes, I will need find places where args passes to Array() is not kind of Array
class.
пятница, 6 мая 2016 г., 1:02:26 UTC+3 пользователь Ufuk Kayserilioglu
написал:
>
> Andrey,
>
> Be careful with this because the sematics of the two are not exactly equal:
>
> [1] pry(m
Thanks for your feedback.
I agree with you about use idioms for better readable code. Its cool, but
Rails has many places where this not use. A lot of code can be corrected
according to this, but this is not done.
And I thought, why not use it in favor of speed?
That is what I was based when wrot
Here is the relevant section in the changelog, I think:
https://github.com/rails/rails/blob/v5.0.0.beta4/actionview/CHANGELOG.md
"Change the default template handler from ERB to Raw.
Files without a template handler in their extension will be rendered
using the raw handler instead of ERB.
Ra
In general, the Rails code base wants to use Ruby idiomatically.
loop is the most succinct idiom in Ruby for those kinds of loops, see for
example:
https://github
.com/rails/rails/blob/254f57ca3668398a5fcfd4f63be5d91c4c3b1cd4/actioncable
/lib/action_cable/connection/stream_event_loop.rb#L66