[ruby-core:85808] [Ruby trunk Feature#14550] Support keyword arguments with Date#step

From: andrew@...
Date: 2018-02-25 19:51:49 UTC
List: ruby-core #85808
Issue #14550 has been updated by avit (Andrew Vit).


If adding keyword options, would it make sense to add the possibility to enumerate by `>>` for whole months instead of `succ` too, or is that out of scope here?

----------------------------------------
Feature #14550: Support keyword arguments with Date#step
https://bugs.ruby-lang.org/issues/14550#change-70665

* Author: ksss (Yuki Kurihara)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
How about supporting keyword arguments with Date#step like Numeric#step?

~~~
from = Date.new(2018, 1, 1)
to = Date.new(2018, 2, 1)
from.step(to: to, by: 3).to_a
~~~

I expected that this is already supported.
But not.

---Files--------------------------------
date-step.patch (2.8 KB)
date-step-2.patch (3.46 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next