summaryrefslogtreecommitdiff
path: root/editors/vim6/files/patch-if_ruby.c
blob: 1b219841aac2043b9a351f5006302121f5a96eb1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- if_ruby.c.orig	Thu Apr  5 02:32:59 2001
+++ if_ruby.c	Sun Apr 29 01:47:30 2001
@@ -66,6 +66,10 @@
 	}
 	line = rb_lastline_get();
 	if (!NIL_P(line)) {
+	    if (TYPE(line) != T_STRING) {
+		EMSG("$_ must be an instance of String");
+		return;
+	    }
 	    ml_replace(i, (char_u *) STR2CSTR(line), 1);
 	    changed();
 #ifdef SYNTAX_HL