Issue #14549 has been reported by ksss (Yuki Kurihara).

----------------------------------------
Bug #14549: abort Date#step
https://bugs.ruby-lang.org/issues/14549

* Author: ksss (Yuki Kurihara)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0dev (2018-02-24 trunk 62563) [x86_64-darwin16]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
~~~
require 'date'
o = Object.new
def o.<=>(*)
  2
end
Date.new(2000, 1, 1).step(3, o) { }
#=> abort
~~~

I think, It's not intentional behavior.
And it should raise TypeError or ArgumentError, maybe.



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

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