Skip to content

Commit 94f9a43

Browse files
authored
Merge pull request #298 from kamipo/fix_typos
Fix some typos
2 parents d94c42b + b19ba32 commit 94f9a43

10 files changed

Lines changed: 23 additions & 23 deletions

File tree

CHANGELOG.rdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
installed anymore
135135

136136
* Bugfixes
137-
* Backup API is conditionaly required so that older libsqlite3 can be used.
137+
* Backup API is conditionally required so that older libsqlite3 can be used.
138138
Thanks Hongli Lai.
139139
* Fixed segmentation fault when nil is passed to SQLite3::Statement.new
140140
* Fix extconf's hardcoded path that affected installation on certain systems.

ext/sqlite3/aggregator.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
* in-flight for this aggregator. */
1111
static VALUE cAggregatorWrapper;
1212

13-
/* wraps a intance of the "handler" class. Loses its reference at the end of
13+
/* wraps a instance of the "handler" class. Loses its reference at the end of
1414
* the xFinal callback.
1515
*
16-
* An AggregatorInstance holds the following instnace variables:
16+
* An AggregatorInstance holds the following instance variables:
1717
* -handler_instance: the instance to call `step` and `finalize` on.
1818
* -exc_status: status returned by rb_protect.
19-
* != 0 if an exception occurred. If an exception occured
19+
* != 0 if an exception occurred. If an exception occurred
2020
* `step` and `finalize` won't be called any more. */
2121
static VALUE cAggregatorInstance;
2222

@@ -48,7 +48,7 @@ rb_sqlite3_protected_funcall(VALUE self, ID method, int argc, VALUE *params,
4848
}
4949

5050
/* called in rb_sqlite3_aggregator_step and rb_sqlite3_aggregator_final. It
51-
* checks if the exection context already has an associated instance. If it
51+
* checks if the execution context already has an associated instance. If it
5252
* has one, it returns it. If there is no instance yet, it creates one and
5353
* associates it with the context. */
5454
static VALUE
@@ -165,8 +165,8 @@ rb_sqlite3_aggregator_final(sqlite3_context * ctx)
165165
if (exc_status) {
166166
/* the user should never see this, as Statement.step() will pick up the
167167
* outstanding exception and raise it instead of generating a new one
168-
* for SQLITE_ERROR with message "Ruby Exception occured" */
169-
sqlite3_result_error(ctx, "Ruby Exception occured", -1);
168+
* for SQLITE_ERROR with message "Ruby Exception occurred" */
169+
sqlite3_result_error(ctx, "Ruby Exception occurred", -1);
170170
}
171171

172172
rb_sqlite3_aggregate_instance_destroy(ctx);

ext/sqlite3/database.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ static int regular_callback_function(VALUE callback_ary, int count, char **data,
710710

711711
/* Is invoked by calling db.execute_batch2(sql, &block)
712712
*
713-
* Executes all statments in a given string separated by semicolons.
713+
* Executes all statements in a given string separated by semicolons.
714714
* If a query is made, all values returned are strings
715715
* (except for 'NULL' values which return nil),
716716
* so the user may parse values with a block.

ext/sqlite3/statement.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static VALUE bind_param(VALUE self, VALUE key, VALUE value)
290290
/* call-seq: stmt.reset!
291291
*
292292
* Resets the statement. This is typically done internally, though it might
293-
* occassionally be necessary to manually reset the statement.
293+
* occasionally be necessary to manually reset the statement.
294294
*/
295295
static VALUE reset_bang(VALUE self)
296296
{
@@ -309,7 +309,7 @@ static VALUE reset_bang(VALUE self)
309309
/* call-seq: stmt.clear_bindings!
310310
*
311311
* Resets the statement. This is typically done internally, though it might
312-
* occassionally be necessary to manually reset the statement.
312+
* occasionally be necessary to manually reset the statement.
313313
*/
314314
static VALUE clear_bindings_bang(VALUE self)
315315
{

faq/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Placeholders in an SQL statement take any of the following formats:
127127
Where _n_ is an integer, and _word_ is an alpha-numeric identifier (or
128128
number). When the placeholder is associated with a number, that number
129129
identifies the index of the bind variable to replace it with. When it
130-
is an identifier, it identifies the name of the correponding bind
130+
is an identifier, it identifies the name of the corresponding bind
131131
variable. (In the instance of the first format--a single question
132132
mark--the placeholder is assigned a number one greater than the last
133133
index used, or 1 if it is the first.)

faq/faq.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
Where _n_ is an integer, and _word_ is an alpha-numeric identifier (or
129129
number). When the placeholder is associated with a number, that number
130130
identifies the index of the bind variable to replace it with. When it
131-
is an identifier, it identifies the name of the correponding bind
131+
is an identifier, it identifies the name of the corresponding bind
132132
variable. (In the instance of the first format--a single question
133133
mark--the placeholder is assigned a number one greater than the last
134134
index used, or 1 if it is the first.)

lib/sqlite3/constants.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module ErrorCode
3737
EMPTY = 16 # (Internal Only) Database table is empty
3838
SCHEMA = 17 # The database schema changed
3939
TOOBIG = 18 # Too much data for one row of a table
40-
CONSTRAINT = 19 # Abort due to contraint violation
40+
CONSTRAINT = 19 # Abort due to constraint violation
4141
MISMATCH = 20 # Data type mismatch
4242
MISUSE = 21 # Library used incorrectly
4343
NOLFS = 22 # Uses OS features not supported on host

lib/sqlite3/database.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def execute2( sql, *bind_vars )
238238
# rows.
239239
#
240240
# See also #execute_batch2 for additional ways of
241-
# executing statments.
241+
# executing statements.
242242
def execute_batch( sql, bind_vars = [], *args )
243243
# FIXME: remove this stuff later
244244
unless [Array, Hash].include?(bind_vars.class)
@@ -295,7 +295,7 @@ def execute_batch( sql, bind_vars = [], *args )
295295
# a block can be passed to parse the values accordingly.
296296
#
297297
# See also #execute_batch for additional ways of
298-
# executing statments.
298+
# executing statements.
299299
def execute_batch2(sql, &block)
300300
if block_given?
301301
result = exec_batch(sql, @results_as_hash)
@@ -308,7 +308,7 @@ def execute_batch2(sql, &block)
308308
end
309309

310310
# This is a convenience method for creating a statement, binding
311-
# paramters to it, and calling execute:
311+
# parameters to it, and calling execute:
312312
#
313313
# result = db.query( "select * from foo where a=?", [5])
314314
# # is the same as
@@ -537,10 +537,10 @@ def finalize
537537
# db.create_aggregate_handler( LengthsAggregateHandler )
538538
# puts db.get_first_value( "select lengths(name) from A" )
539539
def create_aggregate_handler( handler )
540-
# This is a compatiblity shim so the (basically pointless) FunctionProxy
540+
# This is a compatibility shim so the (basically pointless) FunctionProxy
541541
# "ctx" object is passed as first argument to both step() and finalize().
542542
# Now its up to the library user whether he prefers to store his
543-
# temporaries as instance varibales or fields in the FunctionProxy.
543+
# temporaries as instance variables or fields in the FunctionProxy.
544544
# The library user still must set the result value with
545545
# FunctionProxy.result= as there is no backwards compatible way to
546546
# change this.
@@ -575,7 +575,7 @@ def finalize
575575
# The functions arity is the arity of the +step+ method.
576576
def define_aggregator( name, aggregator )
577577
# Previously, this has been implemented in C. Now this is just yet
578-
# another compatiblity shim
578+
# another compatibility shim
579579
proxy = Class.new do
580580
@template = aggregator
581581
@name = name

lib/sqlite3/pragmas.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ def set_boolean_pragma( name, mode )
4242
# Requests the given pragma (and parameters), and if the block is given,
4343
# each row of the result set will be yielded to it. Otherwise, the results
4444
# are returned as an array.
45-
def get_query_pragma( name, *parms, &block ) # :yields: row
46-
if parms.empty?
45+
def get_query_pragma( name, *params, &block ) # :yields: row
46+
if params.empty?
4747
execute( "PRAGMA #{name}", &block )
4848
else
49-
args = "'" + parms.join("','") + "'"
49+
args = "'" + params.join("','") + "'"
5050
execute( "PRAGMA #{name}( #{args} )", &block )
5151
end
5252
end

lib/sqlite3/translator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def add_translator( type, &block ) # :yields: type, value
4343
end
4444

4545
# Translate the given string value to a value of the given type. In the
46-
# absense of an installed translator block for the given type, the value
46+
# absence of an installed translator block for the given type, the value
4747
# itself is always returned. Further, +nil+ values are never translated,
4848
# and are always passed straight through regardless of the type parameter.
4949
def translate( type, value )

0 commit comments

Comments
 (0)