From: Peter Hickman Date: 2006-05-03T19:34:21+09:00 Subject: Problem with SQLite and Ruby I'm having a little problem here. I have a version 2 SQLite database and the following code: #!/usr/bin/ruby require 'sqlite' db = SQLite::Database.new( "db/ars.db", 0644 ) db.results_as_hash = true db.execute( "SELECT * FROM sources;" ) do |source| source.each do |k,v| puts "#{k} => #{v}" end puts end And I get: 0 => sshd 1 => SSH Daemon id => sshd description => SSH Daemon 0 => ipfw 1 => Firewall id => ipfw description => Firewall 0 => snort 1 => SNORT IDS id => snort description => SNORT IDS 0 => apache_error 1 => Apache Error Log id => apache_error description => Apache Error Log But what I was expecting / wanted is: id => sshd description => SSH Daemon id => ipfw description => Firewall id => snort description => SNORT IDS id => apache_error description => Apache Error Log What am I doing wrong?