Issue #14549 has been updated by usa (Usaku NAKAMURA).

Backport changed from 2.3: REQUIRED, 2.4: DONE, 2.5: DONE to 2.3: DONE, 2.4: DONE, 2.5: DONE

ruby_2_3 r62947 merged revision(s) 62572.

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

* Author: ksss (Yuki Kurihara)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0dev (2018-02-24 trunk 62563) [x86_64-darwin16]
* Backport: 2.3: DONE, 2.4: DONE, 2.5: DONE
----------------------------------------
~~~ruby
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>