aboutsummaryrefslogtreecommitdiffstats
path: root/enum.c
Commit message (Collapse)AuthorAgeFilesLines
...
* * remove trailing spaces.nobu2011-05-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_inject): typo fixed. a patch from Gaku Ueda inmatz2011-02-121-1/+1
| | | | | | [ruby-core:35216]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (sort_by_i): reenter check more strictly.akr2011-01-121-4/+14
| | | | | | | | (sort_by_cmp): ditto. [ruby-dev:43003] reported by Usaku NAKAMURA. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix spaces.akr2011-01-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_sort_by): use rb_ary_resize.akr2011-01-081-15/+2
| | | | | | | (ary_cutoff): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_sort_by): use less temporary objects.akr2010-12-311-14/+50
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2010-12-301-3/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c: use constants in id.h.nobu2010-10-301-6/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_zip): fix typo of rdoc.naruse2010-09-011-1/+1
| | | | | | patched by Andrei Kulakov [ruby-core:31974] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_inject): fix typo of rdoc.naruse2010-08-191-1/+1
| | | | | | patched by Andrei Kulakov [ruby-core:31768] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (zip): rdoc fix, patch by okkez [ruby-dev:41737]marcandre2010-06-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * removed trailing spaces.nobu2010-05-291-7/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c: Documentation: small fixesmarcandre2010-05-171-7/+7
| | | | | | | | * file.c: ditto * io.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c: Documentation: change => in call-seq to ->.marcandre2010-05-171-84/+84
| | | | | | | | | | | | | | * enum.c: Documentation: whitespace fix for r27865 * error.c: ditto * file.c: ditto * io.c: ditto * load.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: Documentation: change => in call-seq to ->.marcandre2010-05-171-85/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Harmonize "#=>" in examples. [ruby-core:30206] * bignum.c: ditto * class.c: ditto * compar.c: ditto * cont.c: ditto * dir.c: ditto * encoding.c: ditto * enum.c: ditto * enumerator.c: ditto * error.c: ditto * eval.c: ditto * file.c: ditto * gc.c: ditto * io.c: ditto * load.c: ditto * marshal.c: ditto * math.c: ditto * numeric.c: ditto * object.c: ditto * pack.c: ditto * proc.c: ditto * process.c: ditto * random.c: ditto * range.c: ditto * re.c: ditto * ruby.c: ditto * signal.c: ditto * sprintf.c: ditto * string.c: ditto * struct.c: ditto * thread.c: ditto * time.c: ditto * transcode.c: ditto * variable.c: ditto * vm_eval.c: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: Harmonize documentation, in particular regarding:marcandre2010-05-131-27/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - methods returning enumerators - array methods and argument naming (array -> ary, an_array -> new_ary) - minor improvements, typo fixed and styling issues Other documentation errors fixed: - return value was self instead of a new array (or vice-versa) for Array#{pop,shift,permutation,repeated_permutation,keep_if} - Array#rindex was missing the form with a block. * dir.c: ditto. * enum.c: ditto. Modified Enumerable#reverse_each' documentation to clarify that #each will be finish before any element is yielded. * error.c: ditto. * gc.c: ditto. * hash.c: ditto. * io.c: ditto. IO#{codepoints,each_codepoint} fixed as per [ruby-core:23948] * numeric.c: ditto. * range.c: ditto. * string.c: ditto. * struct.c: ditto. * vm_eval.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2010-03-231-5/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update rdoc.akr2010-03-191-2/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2010-03-131-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_join): remove Enumerable#join. [ruby-core:24786]matz2010-03-131-20/+0
| | | | | | * array.c (ary_join_1): use #to_ary to detect recursive array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2010-03-121-9/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (min_ii, max_ii, minmax_ii): remove wrong optimization thatmame2010-03-101-37/+16
| | | | | | | reuses array for yield parameter, which caused unexpected behavior. [ruby-core:25989] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c: move implementation of each_slice, each_cons,matz2010-02-031-0/+144
| | | | | | | | | | | | | each_with_object to enum.c. * enum.c (each_slice_i): convert multiple values from yield into an array. * enum.c (each_cons_i): ditto. * enum.c (each_with_object_i): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* unused variable removed.akr2010-02-021-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_each_entry): new method #each_entry to pack valuesmatz2010-02-021-0/+41
| | | | | | | | | | | | | | from yield into an array. * lib/set.rb (Set#merge): use Enumerable#each_entry to implement Set compatible to 1.8 behavior. [ruby-core:27985] * lib/set.rb: replace is_a?(Enumerable) with respond_to?(:each) for duck typing. * lib/set.rb (SortedSet#add): typo fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos.akr2009-11-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_count): remove optimization using #size.matz2009-10-311-6/+0
| | | | | | | | revert r25560. * vm_eval.c (rb_funcall_no_recursive): remove method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_count): call #size using rb_funcall_no_recursive()matz2009-10-291-2/+4
| | | | | | | | | | | to prevent infinite recursive calls. [ruby-core:24794] * vm_eval.c (rb_funcall_no_recursive): utility function to check direct recursive call. * vm_eval.c (rb_check_funcall): move from eval.c. [refactoring] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_to_ary): do not use #respond_to? to detectmatz2009-10-291-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to_ary. Just call. [ruby-core:23738] * eval.c (rb_check_funcall): new function with method existence check. returns Qundef when the method does not exist. * enumerator.c (enumerator_rewind): just call method, using rb_check_funcall(). [ruby-core:23738] * error.c (exc_equal): ditto. * object.c (convert_type): ditto. * error.c (rb_name_err_mesg_new): export function. * eval.c (make_exception): ditto. * io.c (pop_last_hash): return early when the last argument is nil. * io.c (rb_io_puts): treat T_STRING specially for small optimization. * vm_eval.c (raise_method_missing): skip method call if possible using rb_method_basic_definition_p(). * vm_eval.c (method_missing): ditto. * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_debug): test suites changed to ignore exceptions caused by just-call policy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_flat_map): new method that concatenates the valuesmatz2009-10-241-0/+44
| | | | | | from given block. also provides alias #collect_concat. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-10-111-3/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (slicebefore_ii): use id_eqq.akr2009-10-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* enum.c (enum_chunk): Give proper error message if no block given. cf ↵marcandre2009-10-031-0/+2
| | | | | | [ruby-core:25912] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-10-021-13/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-10-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_slice_before): take a pattern if no block given.akr2009-10-021-18/+40
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update rdoc.akr2009-10-021-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-09-271-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_minmax): use struct for memo.akr2009-09-271-73/+92
| | | | | | | (enum_minmax_by): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix rdoc.akr2009-09-271-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-09-251-15/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-09-241-18/+48
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_minmax): reduce comparison.akr2009-09-231-36/+135
| | | | | | | (enum_minmax_by): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_chunk): new method Enumerable#chunk.akr2009-09-221-0/+325
| | | | | | | | * enum.c (enum_slice_before): new method Enumerable#slice_before. [ruby-dev:38392] [ruby-dev:39240] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * suppressed shorten-64-to-32 warnings.nobu2009-07-181-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (recursive_join): use obj to tell if recursion occurs.nobu2009-07-101-30/+1
| | | | | | | | | [ruby-core:24150] * enum.c (enum_join): reverted r23966. [ruby-core:24196] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (DEFINE_ENUMFUNCS): included function signature.nobu2009-07-071-21/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (rb_enum_join): non-nil separator must be convertible tonobu2009-07-071-0/+1
| | | | | | | String. [ruby-core:24172] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (rb_enum_join): should propagate taint to the returnmatz2009-07-071-1/+5
| | | | | | value. the change was overridden by r23967. [ruby-core:24176] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_to_a): should propagate taint to the return value.matz2009-07-061-0/+4
| | | | | | | | [ruby-core:24152] * enum.c (enum_sort_by): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e