ruby-changes:55551
From: Kazuhiro <ko1@a...>
Date: Sat, 27 Apr 2019 12:23:03 +0900 (JST)
Subject: [ruby-changes:55551] Kazuhiro NISHIYAMA:48313f129a (trunk): Add `or nil` to call-seq of `Enumerator::ArithmeticSequence#begin`
https://git.ruby-lang.org/ruby.git/commit/?id=48313f129a From 48313f129abd464c69853a66af22adbad260b82e Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Sat, 27 Apr 2019 12:21:35 +0900 Subject: Add `or nil` to call-seq of `Enumerator::ArithmeticSequence#begin` ``` % ruby -ve 'p (nil..).first' ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18] nil % ruby -ve 'p (nil..).begin' ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18] nil ``` diff --git a/enumerator.c b/enumerator.c index 9a0f926..76560fa 100644 --- a/enumerator.c +++ b/enumerator.c @@ -2936,7 +2936,7 @@ rb_arith_seq_new(VALUE obj, VALUE meth, int argc, VALUE const *argv, https://github.com/ruby/ruby/blob/trunk/enumerator.c#L2936 } /* - * call-seq: aseq.begin -> num + * call-seq: aseq.begin -> num or nil * * Returns the number that defines the first element of this arithmetic * sequence. -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/