Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix -w warnings

  • Loading branch information...
commit 7fa37892b62b126970a9349aefd0aedc5118e505 1 parent 9a92f42
@copiousfreetime authored
Showing with 10 additions and 9 deletions.
  1. +6 −5 lib/amalgalite/table.rb
  2. +4 −4 spec/database_spec.rb
View
11 lib/amalgalite/table.rb
@@ -26,11 +26,12 @@ class Table
attr_accessor :columns
def initialize( name, sql = nil )
- @name = name
- @sql = sql
- @indexes = {}
- @columns = {}
- @schema = nil
+ @name = name
+ @sql = sql
+ @indexes = {}
+ @columns = {}
+ @schema = nil
+ @primary_key = nil
end
# Is the table a temporary table or not
View
8 spec/database_spec.rb
@@ -260,23 +260,23 @@ class MyExceptionTest < RuntimeError; end
describe "#define_function" do
it "does not allow mixing of arbitrary and mandatory arguments to an SQL function" do
- class FunctionTest2 < ::Amalgalite::Function
+ class DBFunctionTest2 < ::Amalgalite::Function
def initialize
super( 'ftest2', -2 )
end
def call( a, *args ); end
end
- lambda { @iso_db.define_function("ftest2", FunctionTest2.new ) }.should raise_error( ::Amalgalite::Database::FunctionError )
+ lambda { @iso_db.define_function("ftest2", DBFunctionTest2.new ) }.should raise_error( ::Amalgalite::Database::FunctionError )
end
it "does not allow outrageous arity" do
- class FunctionTest3 < ::Amalgalite::Function
+ class DBFunctionTest3 < ::Amalgalite::Function
def initialize
super( 'ftest3', 128 )
end
def call( *args) ; end
end
- lambda { @iso_db.define_function("ftest3", FunctionTest3.new ) }.should raise_error( ::Amalgalite::SQLite3::Error )
+ lambda { @iso_db.define_function("ftest3", DBFunctionTest3.new ) }.should raise_error( ::Amalgalite::SQLite3::Error )
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.