diff options
author | zverok <[email protected]> | 2020-12-05 13:39:20 +0200 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-01-02 17:27:24 +0900 |
commit | b8d33df1d9799cd04b92c1c28e42cc3028cc7524 () | |
tree | e84491b66b3adf71b6f78c18848c59c10ba21320 /enumerator.c | |
parent | f690eb34e28b000627e5f0649dd81a04e252286f (diff) |
Add Enumerable#compact and Enumerator::Lazy#compact
Notes: Merged: https://.com/ruby/ruby/pull/3851
-rw-r--r-- | enumerator.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -2654,6 +2654,30 @@ lazy_uniq(VALUE obj) } static struct MEMO * lazy_with_index_proc(VALUE proc_entry, struct MEMO* result, VALUE memos, long memo_index) { struct proc_entry *entry = proc_entry_ptr(proc_entry); @@ -4098,6 +4122,7 @@ InitVM_Enumerator(void) rb_define_method(rb_cLazy, "slice_when", lazy_super, -1); rb_define_method(rb_cLazy, "chunk_while", lazy_super, -1); rb_define_method(rb_cLazy, "uniq", lazy_uniq, 0); rb_define_method(rb_cLazy, "with_index", lazy_with_index, -1); lazy_use_super_method = rb_hash_new_with_size(18); |