Age | Commit message (Collapse) | Author |
|
Fix size on Enumerable#cycle when the size is 0 [Bug #14082].
Patch by Kenichi Kamiya
test/ruby/test_lazy_enumerator.rb: test for [Bug #14082]
enum.c: check argument first
* enum.c (enum_cycle_size): check an argument before the size of
the receiver, if it is given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[DOC] Update an obsolete example for slice_before.
The argument for Enumerable#slice_before is is removed at Ruby 2.3.
Reported by Shyouhei Urabe. [Bug #13202]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Enumerable#{min,min_by,max,max_by} [ci skip]
* enum.c: [DOC] Enumerable#{min,min_by,max,max_by} return a sorted
array when +n+ argument is used.
* enum.c: Small typo : minimum -> maximum
[Bug #13161]
Author: Eric Duminil <eric.duminil@gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[ci skip][fix GH-1140] Patch by @jutaz
* io.c: ditto.
* iseq.c: ditto.
* numeric.c: ditto.
* process.c: ditto.
* string.c: ditto.
* vm_trace.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
patch by Helder Pereira.
[Bug #11471] [ruby-core:70477]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[fix GH-985] Patch by @yui-knk
* test/ruby/test_enum.rb: added tests for Enumerable#zip
[fix GH-985] Patch @yui-knk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Patch by @yui-knk [fix GH-955]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
volatile appears unnecessary in most cases as the VALUEs are used as
arguments of uninlined functions. Even worse, volatile can be
insufficient in places where RB_GC_GUARD is necessary.
* enum.c (zip_ary): remove volatile, use RB_GC_GUARD
(zip_i): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
No need to call three functions on success when one will do.
This results in less LoC and smaller object code, too:
text data bss dec hex filename
33860 0 296 34156 856c gcc/enum.o-before
33852 0 296 34148 8564 gcc/enum.o
* enum.c (enum_minmax): simplify return value creation
* test/ruby/test_enum.rb: test behavior on empty
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[ruby-core:67738] [Feature #10769] proposed by Tsuyoshi Sawada.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Patch provided by @jwworth
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[fix GH-901][ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Implement Enumerable#grep_v.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
it requires recursion check.
then, it doesn't make performance improvement.
[Bug #11130] [Feature #9118]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[Bug #11130]
* test/ruby/test_enum.rb: test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
the patch is from HonoreDB <aweiner at mdsol.com>.
[fix GH-444]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
It's my fault.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
It's my fault.
This reverts commit 5e17fc6bc7cb8b0e58b05fa9ebf2c47ec73ecbb3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
This reverts commit 3482910fc4ca8515b38f56bdd9fa0db7002413ad.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
the initial_state argument. [Feature #10958]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[fix GH-756][ci skip] Patch by @shamanime
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
memo->v1 and memo->v2 is WB protected values.
So use MEMO_V1/V2_SET() macros to set these values.
memo->u3 is ambiguous (sometimes a VALUE, sometimes an integer
value), so use gc_mark_maybe() in gc.c to mark it.
Rename NEW_MEMO() to MEMO_NEW().
Move MEMO_FOR and NEW_MEMO_FOF macros from node.h.
Export a rb_imemo_new() function for ext/ripper.
* node.h: remove NODE_MEMO.
* enum.c: catch up these change.
* enumerator.c: ditto.
* load.c: ditto.
* ext/objspace/objspace.c (count_nodes): ditto.
* gc.c (gc_mark_children): mark imemo_memo type.
* parse.y (new_args_gen): use T_IMEMO.
(I'm not sure it is working correctly...)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* enum.c: use MEMO.
* enumerator.c: ditto.
* load.c: ditto.
* node.h: return (struct MEMO *) pointer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[fix GH-842][ci skip] Patch by @jsyeo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* enum.c (limit_by_enum_size, enum_size_over_p): check only
against Fixnum size.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* enum.c (enum_each_slice, enum_each_cons): limit elements size by
the enumerator size. suggested by Hans Mackowiak <hanmac AT
gmx.de> at [ruby-core:68335]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* use rb_funcallv() for no arguments call instead of variadic
rb_funcall().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
includable without prior inclusion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* enum.c (enum_inject): return nil if no iteration, instead of
Qundef.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* enum.c (enum_inject): use Qundef for no initial values.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(struct nmin_data): New field to record the n-th maximumelement, limit
(nmin_filter): Update limit field.
(nmin_i): Drop too big eleents.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
descending order.
[ruby-core:65452] Suggested by David Grayson.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(enum_slice_before): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
(slicewhen_i): New function.
(slicewhen_ii): New function.
* enumerator.c (InitVM_Enumerator): New method:
Enumerator::Lazy#slice_when.
[ruby-core:62499] [Feature #9826]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* enum.c (enum_one): Move enum.one? documentation before the
relevant method. Submitted by @vipulnsward. [Fixes GH-687]
https://github.com/ruby/ruby/pull/687
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* encoding.c (rb_enc_get_index): deal with symbols instead of IDs
to get rid of inadvertent pin-downs.
* enum.c (chunk_ii): ditto.
* enumerator.c (append_method): ditto.
* iseq.c (iseq_load): ditto.
* marshal.c (w_symbol, r_symlink, r_symreal, r_symbol): ditto.
* signal.c (trap_handler): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
revert "enum.c: optimize any? object allocations for Array and Hash"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* enum.c (enum_any): optimize object allocations for Array and
Hash when `each` is not redefined, always false if empty and the
case without a block. [fix GH-617]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Patch submitted via documenting-ruby/ruby#34 [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|