Hi all,

Ruby 1.8.4 and 1.8.5
Solaris 10
ruby-oci8 0.1.15
Oracle 9i

I think this is a bug in OCI8, but I'm not positive, so I thought I would post 
it here in case anyone has any ideas.

require 'rubygems'
require 'dbi'
require 'date'

sql = "select due_date from some_table where type = 'FOO'"

dbh = DBI.connect(dsn, user, passwd)

sth = dbh.prepare(sql)
sth.execute

while rec = sth.fetch
    due_date = Date.parse(rec['DUE_DATE']).strftime("%d-%b-%y") # BOOM!
end

sth.finish
dbh.disconnect

# Result:
/opt/test/lib/ruby/1.8/date/format.rb:253:in 
`_parse'/opt/test/lib/ruby/1.8/date/format.rb:253: [BUG] Segmentation fault
ruby 1.8.5 (2006-07-07) [sparc-solaris2.10]

Abort (core dumped)


The due_date is in '2025/01/01 00:00:00' format.  Running an independent 
program didn't seem to have any trouble:

# date_parse_test.rb
require 'date'

date = '2025/01/01 00:00:00'

1000.times{
    Date.parse(date).strftime("%d-%b-%y") # No problemo
}

Any ideas?  I'll post this for Kubo to look at as well.

Regards,

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.