Daniel Berger wrote:
> 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.

<snip>

I've narrowed it down even further.  I forgot that OCI8 returns a type OraDate 
for the dates.  Anyway, I found this bit interesting.  The gsub line below is 
what date/parse.rb does.

while rec = sth.fetch
    date = rec['DUE_DATE']
    date.gsub!(/[^-+,.\/:0-9a-z]+/ino, ' ')
end

This results in a normal error:

oci_core.rb:23: private method `gsub!' called for 2025/01/01 00:00:00:OraDate 
(NoMethodError)

However, if we dup the object first (as parse.rb does), then we get the segfault:

while rec = sth.fetch
    date = rec['DUE_DATE'].dup
    date.gsub!(/[^-+,.\/:0-9a-z]+/ino, ' ') # Boom!
end

What's happening here?

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.