diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-02 14:56:06 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-02 14:56:06 +0000 |
commit | fd4b5b8dc83e61bbbb62fa7e6194c0ece6b9349f (patch) | |
tree | 4668b505d912b4b1fdbdd7bfca8599fe7f495b1f /NEWS | |
parent | a94833eb503358ac3fe434e13be41007b92558b1 (diff) | |
download | ruby-fd4b5b8dc83e61bbbb62fa7e6194c0ece6b9349f.tar.gz |
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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -72,6 +72,12 @@ with all sufficient information, see the ChangeLog file. * misc * Mutex#owned? is no longer experimental. +* Numeric + * extended methods: + * Numeric#step allows the limit argument to be omitted, in which + case an infinite sequence of numbers is generated. Keyword + arguments `to` and `by` are introduced for ease of use. + * Process * New methods: * alternative methods to $0/$0=: |