General

Profile

Nobuyoshi Nakada

Issues

Projects

Activity

Today

02:39 AM Ruby trunk Bug #13136 (Closed): large_array.sample(11)が遅い
Applied in changeset r57380.
----------
array.c: improve Array#sample
* array.c (rb_ary_sample): improve performanc...
02:39 AM Ruby trunk Revision 57380: array.c: improve Array#sample
* array.c (rb_ary_sample): improve performance when many samples
from a large array. based on the patch by tomoya ...
02:27 AM Ruby trunk Revision 57379: benchmarks for Bug#13136
01:02 AM Ruby trunk Revision 57377: error.c: print default RS
* error.c (rb_warn_m): print the default RS instead of an empty
string with a newline. [Feature #12944]
12:59 AM Ruby trunk Bug #13136: large_array.sample(11)が遅い
別案としてhashの代わりに配列で覚えておくという方法もありますが、元の配列に比例した作業領域を使うのでそのコストが高いかもしれません。
```diff
diff --git a/array.c b/array.c
inde...

01/19/2017

09:55 AM Ruby trunk Feature #12906 (Closed): do/end blocks work with ensure/rescue/else
Applied in changeset r57376.
----------
parse.y: rescue/else/ensure in do-end
* parse.y (do_body): allow rescue/els...
09:54 AM Ruby trunk Revision 57376: parse.y: rescue/else/ensure in do-end
* parse.y (do_body): allow rescue/else/ensure inside do/end
blocks. [Feature #12906]
08:14 AM Ruby trunk Feature #12929: ternary should look ahead w/in a block (and not care about newlines)
https://github.com/ruby/ruby/compare/trunk...nobu:feature/12929-ternary
07:48 AM Ruby trunk Bug #13138 (Closed): Rounding bug
07:46 AM Ruby trunk Bug #13138: Rounding bug
Fixed by r55604 in the trunk.
```diff
diff --git i/numeric.c w/numeric.c
index 46f112349f..9ff68f25c9 100644
--...

Also available in: Atom