aboutsummaryrefslogtreecommitdiffstats
path: root/enum.c
Commit message (Collapse)AuthorAgeFilesLines
* Prefer the dedecated conversion functionNobuyoshi Nakada2022-01-081-1/+1
|
* Enhanced RDoc for Enumerable (#5393)Burdette Lamar2022-01-041-3/+19
| | | A little more about the classes that include or extend Enumerable.
* Make Enumerable#each_cons return object if over sizeJeremy Evans2021-11-161-5/+5
| | | | | | | | | This behavior changed in dfb47bbd17c3c2b8ce17dbafaf62df023b0224b2, but only for normal exit, not for early exit. Fix it for early exit as well. While here, fix example code in documentation so that it doesn't indicate that the method returns nil.
* Delegate keywords from Enumerable#to_a to #eachJeremy Evans2021-11-051-1/+1
| | | | Fixes [Bug #18289]
* Fix `Enumerable#each_cons` and `Enumerable#each_slice` to return a receiverTSUYUSATO Kitsune2021-10-251-6/+6
| | | | Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com> Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* [DOC] Fix code markup [ci skip]Nobuyoshi Nakada2021-10-251-2/+2
| | | | Code markup in RDoc must not be concatenated with anothr word.
* Accommondate earlier reviews of RDoc for Enumerable (#4943)Burdette Lamar2021-10-061-8/+36
|
* Enhanced RDoc for Enumerable (#4941)Burdette Lamar2021-10-061-38/+40
| | | | | | | | Treated: #sum #uniq #compact
* Enhanced RDoc for Enumerable (#4938)Burdette Lamar2021-10-051-110/+57
| | | | | | | | Treats: #slice_after #slice_when #chunk_while
* Enhanced RDoc for Enumerable#slice_before (#4932)Burdette Lamar2021-10-051-17/+33
| | | | | * Enhanced RDoc for Enumerable#slice_before * Enhanced RDoc for Enumerable#slice_before
* Enhanced RDoc for Enumerable#chunk (#4930)Burdette Lamar2021-10-041-45/+62
|
* Using NIL_P macro instead of `== Qnil`S.H2021-10-031-2/+2
|
* Enhanced RDoc for Enumerable (#4922)Burdette Lamar2021-10-011-29/+46
| | | | | | | | Treated: #drop #drop_while #cycle
* Enhanced RDoc for Enumerable (#4918)Burdette Lamar2021-10-011-35/+80
| | | | | | | | Treats: #zip #take #take_while
* Enhanced RDoc for Enumerable (#4917)Burdette Lamar2021-09-301-75/+110
| | | | | | | | | | | Treats: #each_with_index #reverse_each #each_entry #each_slice #each_cons #each_with_object
* Enhanced RDoc for Enumerable (#4910)Burdette Lamar2021-09-291-124/+160
| | | | | | | | | | | | Treats: #min #max #minmax #min_by #max_by #minmax_by #include?
* Enhanced RDoc for Enumerable (#4908)Burdette Lamar2021-09-281-58/+121
| | | | | | | | Treated: #none? #one? #min
* Enhanced RDoc for Enumerable (#4906)Burdette Lamar2021-09-281-88/+176
| | | | | | | | | | | | | Treats: #partition #group_by #tally #first #sort #sort_by #all? #any?
* Enhanced RDoc for Enumerable#inject (#4876)Burdette Lamar2021-09-201-38/+131
|
* Using RB_BIGNUM_TYPE_P macroS-H-GAMELINKS2021-09-111-3/+3
|
* Enhanced RDoc for Enumerable (#4808)Burdette Lamar2021-09-101-26/+21
| | | | | | #to_a #to_h #inject
* Extracted repeatedly defined IDsNobuyoshi Nakada2021-07-271-27/+53
|
* Enhanced RDoc for Enumerable (#4479)Burdette Lamar2021-05-101-101/+104
| | | | | | | | | | | | | Methods treated: #count #find #find_index #select #filter_map #reject #map #flat_map
* Enhanced RDoc for Enumerable (#4473)Burdette Lamar2021-05-081-21/+39
| | | Enhanced RDoc for Enumerable: #grep and #grep_v.
* Fix Enumerable#tally with some arguments pattern [Feature #17744]Kenichi Kamiya2021-03-271-3/+7
| | | | | | | | | | | | | | * Add test cases for Enumerable#tally with hash argument * Add ruby/spec for Enumerable#tally with hash argument * Fix Enumerable#tally does not update given frozen hash * Add test cases for Enumerable#tally with hash convertible arguments * Fix SEGV when Enumerable#tally takes non Hash convertible * FIx cosmetic damage enum.c
* Enumerable#tally with the resulting hash [Feature #17744]Nobuyoshi Nakada2021-03-261-6/+22
|
* Add write-barrier in tallyNobuyoshi Nakada2021-03-201-1/+4
|
* Fix Enumerable#inject with high negative fixnums [Bug #17731]Marc-Andre Lafortune2021-03-191-1/+1
|
* Improve Enumerable#tally performanceNobuyoshi Nakada2021-03-161-6/+14
| | | | | | | | | Iteration per second (i/s) | |compare-ruby|built-ruby| |:------|-----------:|---------:| |tally | 52.814| 114.936| | | -| 2.18x|
* RDoc: Enhanced introduction for Enumerable (#4004)Burdette Lamar2021-01-041-7/+129
| | | | | | | * RDoc: Enhanced introduction for Enumerable * RDoc: Enhanced introduction for Enumerable * RDoc: Enhanced introduction for Enumerable
* Fix indent [ci skip]Kazuhiro NISHIYAMA2021-01-051-4/+4
| | | | | Suggested by @hanachin at https://github.com/rurema/doctree/pull/2425#discussion_r551327592
* Add Enumerable#compact and Enumerator::Lazy#compactzverok2021-01-021-0/+43
|
* Removed leading spaces [ci skip]Nobuyoshi Nakada2020-12-161-1/+1
|
* Optimize `Enumerable#grep{_v}`Marc-Andre Lafortune2020-12-151-12/+40
| | | | [Bug #17030]
* Removed canonicalization for mathnNobuyoshi Nakada2020-11-101-10/+1
|
* Fix linksS-H-GAMELINKS2020-11-101-1/+1
|
* Don't redefine #rb_intern over and over againStefan Stüben2020-10-211-4/+1
|
* Respect visibility in non-array Enumerable#inject [Bug #13592]Nobuyoshi Nakada2020-07-241-1/+1
|
* add spaces [ci skip]卜部昌平2020-06-291-0/+14
|
* sum_iter: do not goto into a branch卜部昌平2020-06-291-107/+115
| | | | | I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor.
* Update example code in Enumerator#chunk documentation [ci skip]Jeremy Evans2020-06-121-1/+1
| | | | | | | | | The code assumed that /usr/share/dict/words did not use mixed case, and it does at least on a few operating systems. From CryptoRAT (Luke Elliot) Fixes [Bug #16957]
* docs: fix typoszTheory2020-06-071-2/+2
|
* Fix max, min, minmax documentation (#3131)Masataka Pocke Kuwabara2020-05-261-3/+3
| | | | They only need that all objects implement <=>, but the documentation said it needs Comparable.
* Added more NORETURN declarationsNobuyoshi Nakada2020-05-111-0/+1
|
* decouple internal.h headers卜部昌平2019-12-261-4/+10
| | | | | | | | | | | | | | | | | | Saves comitters' daily life by avoid #include-ing everything from internal.h to make each file do so instead. This would significantly speed up incremental builds. We take the following inclusion order in this changeset: 1. "ruby/config.h", where _GNU_SOURCE is defined (must be the very first thing among everything). 2. RUBY_EXTCONF_H if any. 3. Standard C headers, sorted alphabetically. 4. Other system headers, maybe guarded by #ifdef 5. Everything else, sorted alphabetically. Exceptions are those win32-related headers, which tend not be self- containing (headers have inclusion order dependencies).
* [DOC] Improve documentation for Enumerable#tallyMarcus Stollsteimer2019-12-221-4/+4
|
* Added documentation for integer range sums (#1593)Eli Sadoff2019-12-111-0/+4
|
* Indicate `find_all` and `select` methods are aliases.Corey Farwell2019-12-111-0/+3
| | | This matches the documentation for `Enumerable::inject` and `Enumerable::reduce` which are also aliases.
* check interrupts at each frame pop timing.Koichi Sasada2019-11-291-3/+0
| | | | | | | | | | | | | | | | | | Asynchronous events such as signal trap, finalization timing, thread switching and so on are managed by "interrupt_flag". Ruby's threads check this flag periodically and if a thread does not check this flag, above events doesn't happen. This checking is CHECK_INTS() (related) macro and it is placed at some places (laeve instruction and so on). However, at the end of C methods, C blocks (IMEMO_IFUNC) etc there are no checking and it can introduce uninterruptible thread. To modify this situation, we decide to place CHECK_INTS() at vm_pop_frame(). It increases interrupt checking points. [Bug #16366] This patch can introduce unexpected events...
* Fix memory corruption in Enumerable#reverse_each [ruby-dev:50867] [Bug #16354]Kazuki Tsujimoto2019-11-191-3/+9
|