Project

General

Profile

Actions

Bug #14549

closed

abort Date#step

Added by ksss (Yuki Kurihara) about 6 years ago. Updated about 6 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.0dev (2018-02-24 trunk 62563) [x86_64-darwin16]
[ruby-core:85796]

Description

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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0