[ruby-cvs:70642] nobu:r63551 (trunk): enum.c: mitigate overflows

nobu at ruby-lang.org nobu at ruby-lang.org
Sat Jun 2 11:39:34 JST 2018

nobu	2018-06-02 11:39:34 +0900 (Sat, 02 Jun 2018)

  New Revision: 63551


    enum.c: mitigate overflows
    * enum.c (enum_count): convert counters to Integer as unsigned
      long, instead of long, to mitigate overflows.
      [ruby-core:87348] [Bug #14805]
    * enum.c (ary_inject_op): ditto.
    * enum.c (each_with_index_i): ditto, instead of int.
    * enum.c (find_index_i, find_index_iter_i): ditto, instead of
      unsigned int.

  Modified files:

More information about the ruby-cvs mailing list