Bug #5296
closedIncompatability with DateTime#strptime Segmentation Fault when parsing string
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
Updated by normalperson (Eric Wong) almost 14 years ago
Diebels Alternative [email protected] wrote:
http://redmine.ruby-lang.org/issues/5296
:004 > DateTime.strptime("df","%m/%d/%Y")
(irb):4: [BUG] Segmentation fault
ruby 1.9.3dev (2011-07-31 revision 32789) [i686-linux]
This is fixed in the ruby_1_9_3 branch (r32956) and will be in the next
1.9.3 release/pre-release.
Updated by naruse (Yui NARUSE) almost 14 years ago
- Status changed from Open to Closed