From: Daniel Berger Date: 2001-06-28T07:43:32+09:00 Subject: [ruby-talk:16980] Warnings with Oracle, DBI 0.5 Hi all, I ran a fairly simple query and got several warnings. The query returned the proper results successfully, but I'm curious as to why I'm getting these warnings. Any ideas? /usr/local/lib/ruby/site_ruby/1.6/dbi/dbi.rb:478: warning: `&' interpreted as argument prefix /usr/local/lib/ruby/site_ruby/1.6/dbi/dbi.rb:644: warning: `&' interpreted as argument prefix /usr/local/lib/ruby/site_ruby/1.6/dbi/utils.rb:134: warning: useless use of [] in void context /usr/local/lib/ruby/site_ruby/1.6/dbi/sql.rb:42: warning: gsub! (...) interpreted as method call /usr/local/lib/ruby/site_ruby/1.6/dbi/sql.rb:44: warning: sub! (...) interpreted as method call /usr/local/lib/ruby/site_ruby/1.6/DBD/Oracle/Oracle.rb:33: warning: discarding old to_i Here's the code (db names and passwords changed to protect the guilty) #!/usr/local/bin/ruby -w require 'dbi' query = "SELECT * FROM rpt_stats WHERE report = 'flow_thru'" dbh = DBI.connect('DBI:Oracle:db','user','passwd') sth = dbh.prepare(query) sth.execute while hash = sth.fetch_hash do puts hash['VALUE2'] end dbh.disconnect # End code Regards, Daniel