[ruby-cvs:49923] knu:r42781 (trunk): Enhance Numeric#step.

knu at ruby-lang.org knu at ruby-lang.org
Mon Sep 2 23:56:07 JST 2013


knu	2013-09-02 23:56:06 +0900 (Mon, 02 Sep 2013)

  New Revision: 42781

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42781

  Log:
    Enhance Numeric#step.
    
    * numeric.c (num_step): Default the limit argument to infinity and
      allow it to be omitted.  Keyword arguments (by: and to:) are
      introduced for ease of use. [Feature #8838] [ruby-dev:47662]
      [ruby-dev:42194]
    
    * numeric.c (num_step): Optimize for infinite loop.

  Modified files:
    trunk/ChangeLog
    trunk/NEWS
    trunk/numeric.c
    trunk/test/ruby/test_numeric.rb


More information about the ruby-cvs mailing list