Project

General

Profile

Actions

Bug #5296

closed

Incompatability with DateTime#strptime Segmentation Fault when parsing string

Bug #5296: Incompatability with DateTime#strptime Segmentation Fault when parsing string

Added by diebels727 (Diebels Alternative) about 14 years ago. Updated about 14 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
1.9.3-preview
Backport:
[ruby-core:39349]

Description

Loading development environment (Rails 3.0.10)
:001 > DateTime.strptime
=> Mon, 01 Jan -4712 00:00:00 +0000
:002 > DateTime.strptime(nil)
TypeError: can't convert nil into String
:003 > DateTime.strptime(nil,"%m/%d/%Y")
TypeError: can't convert nil into String
:004 > DateTime.strptime("df","%m/%d/%Y")
(irb):4: [BUG] Segmentation fault
ruby 1.9.3dev (2011-07-31 revision 32789) [i686-linux]

-- Control frame information -----------------------------------------------
c:0029 p:---- s:-305020823 b:0105 l:000104 d:000104 CFUNC :strptime

Under 1.9.2:

ruby-1.9.2-p290 :003 > DateTime.strptime("df","%m/%d/%Y")
ArgumentError: invalid date

Actions

Also available in: PDF Atom