diff options
author | Takashi Kokubun <[email protected]> | 2022-12-25 21:46:29 -0800 |
---|---|---|
committer | <[email protected]> | 2022-12-25 21:46:29 -0800 |
commit | 509da028c2249cd386190f2856e91549cc9e6c23 () | |
tree | e85a575800cb14245f8acbb0ffe369b22761912c /kernel.rb | |
parent | a236661a62dc89173dcdd9e071365929db1201a7 (diff) |
Rewrite Kernel#loop in Ruby (#6983)
* Rewrite Kernel#loop in Ruby * Use enum_for(:loop) { Float::INFINITY } Co-authored-by: Ufuk Kayserilioglu <[email protected]> * Limit the scope to rescue StopIteration Co-authored-by: Ufuk Kayserilioglu <[email protected]>
Notes: Merged-By: k0kubun <[email protected]>
-rw-r--r-- | kernel.rb | 41 |
1 files changed, 41 insertions, 0 deletions
@@ -150,6 +150,47 @@ module Kernel module_function # # call-seq: # Float(arg, exception: true) -> float or nil |