@@ -43,7 +43,7 @@ static VALUE dictinfo_size_str(VALUE self) {
43
43
void Init_dictinfo () {
44
44
//CLASS DEFINITION=========================================================
45
45
cDictInfo = rb_define_class ("AspellDictInfo" , rb_cObject );
46
-
46
+
47
47
//CLASS METHODS============================================================
48
48
rb_define_singleton_method (cDictInfo , "new" , dictinfo_s_new , 0 );
49
49
@@ -289,7 +289,7 @@ static VALUE aspell_s_list_dicts(VALUE klass) {
289
289
}
290
290
291
291
/**
292
- * @see set_option.
292
+ * @see set_option.
293
293
*/
294
294
static VALUE aspell_set_option (VALUE self , VALUE option , VALUE value ) {
295
295
AspellSpeller * speller = get_speller (self );
@@ -400,7 +400,7 @@ static VALUE aspell_add_to_session(VALUE self, VALUE word) {
400
400
401
401
/**
402
402
* Retrieve the value of a specific option.
403
- * The options are listed inside
403
+ * The options are listed inside
404
404
* Aspell::[DictionaryOptions|CheckerOptions|FilterOptions|RunTogetherOptions|MiscOptions|UtilityOptions]
405
405
* @param word the option as string.
406
406
*/
@@ -489,15 +489,15 @@ static VALUE aspell_check(VALUE self, VALUE word) {
489
489
* This method needs a block to work proper. Each misspelled word is yielded,
490
490
* a correct word as result from the block is assumed.
491
491
* Common use:
492
- *
492
+ *
493
493
* a = Aspell.new(...)
494
494
* text = ...
495
495
* a.correct_lines(text) { |badword|
496
496
* puts "Error: #{badword}\n"
497
497
* puts a.suggest(badword).join(" | ")
498
498
* gets #the input is returned as right word
499
499
* }
500
- *
500
+ *
501
501
* @param ary the array of strings to check.
502
502
* @result an array holding all lines with corrected words.
503
503
*/
@@ -601,6 +601,7 @@ static VALUE aspell_correct_file(VALUE self, VALUE filename) {
601
601
* @return array of strings: words that are misspelled.
602
602
*/
603
603
static VALUE aspell_list_misspelled (VALUE self , VALUE ary ) {
604
+ Check_Type (ary , T_ARRAY );
604
605
VALUE result = rb_hash_new ();
605
606
//create checker
606
607
AspellSpeller * speller = get_speller (self );
@@ -613,6 +614,7 @@ static VALUE aspell_list_misspelled(VALUE self, VALUE ary) {
613
614
while (c < count ) {
614
615
//process line
615
616
vline = RARRAY_PTR (ary )[c ];
617
+ Check_Type (vline , T_STRING );
616
618
aspell_document_checker_process (checker , StringValuePtr (vline ), -1 );
617
619
//iterate over all misspelled words
618
620
while (token = aspell_document_checker_next_misspelling (checker ), token .len != 0 ) {
0 commit comments