comparison src/if_ruby.c @ 2084:4bac7ed34007 v7.2.368

updated for version 7.2.368 Problem: Ruby interface: Appending line doesn't work. (Michael Henry) Solution: Reverse check for NULL line. (James Vega)
author Bram Moolenaar <bram@zimbu.org>
date Thu, 18 Feb 2010 15:53:29 +0100
parents d8983769c9dd
children 53d475dff0e3
comparison
equal deleted inserted replaced
2083:24eb7921b8f0 2084:4bac7ed34007
867 buf_T *buf = get_buf(self); 867 buf_T *buf = get_buf(self);
868 char *line = StringValuePtr(str); 868 char *line = StringValuePtr(str);
869 long n = NUM2LONG(num); 869 long n = NUM2LONG(num);
870 aco_save_T aco; 870 aco_save_T aco;
871 871
872 if (line != NULL) { 872 if (line == NULL) {
873 rb_raise(rb_eIndexError, "NULL line"); 873 rb_raise(rb_eIndexError, "NULL line");
874 } 874 }
875 else if (n >= 0 && n <= buf->b_ml.ml_line_count) 875 else if (n >= 0 && n <= buf->b_ml.ml_line_count)
876 { 876 {
877 /* set curwin/curbuf for "buf" and save some things */ 877 /* set curwin/curbuf for "buf" and save some things */