Permalink
Browse files

make amalgalite 1.9 -w clean

remove unused variables
  • Loading branch information...
1 parent b1e5be1 commit b1ffe8fb03bd4755ba7084173f9be1a2474c3949 @copiousfreetime committed Oct 3, 2012
View
@@ -105,7 +105,7 @@ def initialize( options = {} )
# The SQL to create the table for storing ruby code
#
def create_table_sql
- sql = <<-create
+ <<-create
CREATE TABLE #{options[:table_name]} (
id INTEGER PRIMARY KEY AUTOINCREMENT,
#{options[:filename_column]} TEXT UNIQUE,
@@ -103,9 +103,10 @@ def execute( *params )
end
ensure
s = $!
- begin
+ begin
reset_for_next_execute!
- rescue => e
+ rescue
+ # rescuing nothing on purpose
end
raise s if s != s_before
end
View
@@ -222,7 +222,7 @@
db.in_transaction?.should eql(true)
raise "testing rollback"
end
- rescue => e
+ rescue
@iso_db.in_transaction?.should eql(false)
@iso_db.execute("SELECT count(1) as cnt FROM country").first['cnt'].should eql(242)
end
@@ -364,7 +364,7 @@ def call( *args) "ftest5 called"; end
end
rudeness = Thread.new( @iso_db ) do |db|
- sent = control_queue.deq
+ control_queue.deq
count = 0
loop do
@iso_db.interrupt!
@@ -410,7 +410,6 @@ def call( *args) "ftest5 called"; end
end
it "rolls back a savepoint" do
- all_sub = @iso_db.execute("SELECT count(*) as cnt from subcountry").first['cnt']
us_sub = @iso_db.execute("SELECT count(*) as cnt from subcountry where country = 'US'").first['cnt']
lambda {
@iso_db.savepoint( "t1" ) do |s|
@@ -21,7 +21,6 @@ def query_thread( database )
begin
db.execute("select count(id) from country")
rescue => e
- had_error = e
Thread.current[:exception] = e
end
end
View
@@ -92,15 +92,15 @@
it "knows the schema is dirty when a table is created" do
s = @iso_db.schema
- c = s.tables['country']
+ s.tables['country']
s.dirty?.should be == false
@iso_db.execute( "create table x1( a, b )" )
s.dirty?.should be == true
end
it "knows the schema is dirty when a table is dropped" do
s = @iso_db.schema
- c = s.tables['country']
+ s.tables['country']
@iso_db.execute( "create table x1( a, b )" )
s.dirty?.should be == true
View
@@ -14,7 +14,7 @@ def make_master_iso_db
end
def make_clone_iso_db
- new_path = make_master_iso_db.duplicate( 'testing' )
+ make_master_iso_db.duplicate( 'testing' )
end
end
end
View
@@ -125,7 +125,6 @@
end
it "can execute a single sql command and say if there is remaining sql to execute" do
- db = Amalgalite::Database.new( SpecInfo.test_db )
stmt = @db.prepare( @schema )
stmt.execute
stmt.remaining_sql.size.should be > 0
@@ -148,7 +147,7 @@
db.execute( "create table t1(c1,c2,c3)" )
db.execute("insert into t1(c1,c2,c3) values (1,2,'abc')")
db.prepare( "select oid,* from t1" ) do |stmt|
- rows = stmt.execute
+ stmt.execute
stmt.should be_using_rowid_column
end
View
@@ -34,11 +34,11 @@
end
it "has a stdout tap" do
- s = ::Amalgalite::Taps::Stdout.new
+ ::Amalgalite::Taps::Stdout.new
end
-
+
it "has a stderr tap" do
- s = ::Amalgalite::Taps::Stderr.new
+ ::Amalgalite::Taps::Stderr.new
end
end

0 comments on commit b1ffe8f

Please sign in to comment.