summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-enumerator/mrblib/enumerator.rb
AgeCommit message (Collapse)Author
2018-09-19Removed `to_ary` conversion method.Yukihiro "Matz" Matsumoto
2018-09-19Remove implicit conversion using `to_int` method.Yukihiro "Matz" Matsumoto
The ISO standard does not include implicit type conversion using `to_int`. This implicit conversion often causes vulnerability. There will be no more attacks like #4120. In addition, we have added internal convenience method `__to_int` which does type check and conversion (from floats).
2018-03-27Reimplement `Enumerable#zip` with Enumeratorksss
for fix some specs - [passes each element of the result array to a block and return nil if a block is given](https://github.com/ruby/spec/blob/a585ec35d185435e5c11f371ba4ed2a29d8817bd/core/enumerable/zip_spec.rb#L11-L17) - [converts arguments to arrays using #to_ary](https://github.com/ruby/spec/blob/a585ec35d185435e5c11f371ba4ed2a29d8817bd/core/enumerable/zip_spec.rb#L23-L27) - [converts arguments to enums using #to_enum](https://github.com/ruby/spec/blob/a585ec35d185435e5c11f371ba4ed2a29d8817bd/core/enumerable/zip_spec.rb#L29-L34) - [gathers whole arrays as elements when each yields multiple](https://github.com/ruby/spec/blob/a585ec35d185435e5c11f371ba4ed2a29d8817bd/core/enumerable/zip_spec.rb#L36-L39)
2017-08-11Check method existence in `to_enum'; ref #3773Yukihiro "Matz" Matsumoto
2017-07-30Improved speed of enumeration methodsChristopher Aue
2017-06-21Use `alias enum_for to_enum` instead of `alias :enum_for :to_enum`.Yukihiro "Matz" Matsumoto
2017-03-30Fix Enumerator#each_with_index with blockKenji Okimoto
In previous version, ``` a = [3, 2, 1] e = a.each e.sort_by(&:to_i) # => [] ``` In this version, ``` a = [3, 2, 1] e = a.each e.sort_by(&:to_i) # => [1, 2, 3] ```
2016-12-01Support svalueksss
2016-12-01Support nil argument as no argumentksss
2016-12-01Support Enumerable methodsksss
2015-10-21Revert "Mark core gems with mrbgem tag"Seba Gamboa
This reverts commit 5cdcce8dbddd94ecb9503a0a1d47370c4ef97177.
2015-10-20Remove obvious warnings from docsSeba Gamboa
2015-10-20Fix enumerator doc errorsSeba Gamboa
2015-10-20Mark core gems with mrbgem tagSeba Gamboa
2014-08-08move StopIteration to core; close #2518Yukihiro "Matz" Matsumoto
2014-05-13should not use String#<< which is defined in mruby-string-ext; use ↵Yukihiro "Matz" Matsumoto
Array#join instead; ref #2239
2014-04-06wrap args by parensYukihiro "Matz" Matsumoto
2014-04-06Add args in Enumerator#inspectJun Hiroe
2014-03-30revert #1974; ref #1979Yukihiro "Matz" Matsumoto
2014-03-29Enumerator#initialize support duck-typeksss
2014-03-29Fix a typoJun Hiroe
2014-03-27Enumerable#zip to use enumerator if mruby-enumerator gem is availableYukihiro "Matz" Matsumoto
2014-03-27use __svalue instead of ary2svYukihiro "Matz" Matsumoto
2014-03-15optimize from each to enumerator_block_callksss
2014-03-15fix variable name typoksss
2014-03-15fix self modifying bugksss
2014-03-15fix return value for with_indexksss
2014-03-14make private method enumerator_block_callksss
2014-03-14move dependency check from runtime to mrbgem.rakeYukihiro "Matz" Matsumoto
2014-03-14remove ambiguity warningsYukihiro "Matz" Matsumoto
2014-03-13add mruby-enumeratorksss