1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
```
This commit is contained in:
Kazuhiro NISHIYAMA 2019-04-27 12:21:35 +09:00
parent be8cf0d4f6
commit 48313f129a
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

View file

@ -2936,7 +2936,7 @@ rb_arith_seq_new(VALUE obj, VALUE meth, int argc, VALUE const *argv,
} }
/* /*
* call-seq: aseq.begin -> num * call-seq: aseq.begin -> num or nil
* *
* Returns the number that defines the first element of this arithmetic * Returns the number that defines the first element of this arithmetic
* sequence. * sequence.