changeset 3474:d7b335626ddc v7.3.501

updated for version 7.3.501 Problem: Error for "flush" not being defined when using Ruby command. Solution: Defined "flush" as a no-op method. (Kent Sibilev)
author Bram Moolenaar <bram@vim.org>
date Fri, 20 Apr 2012 18:05:47 +0200
parents a0a87a0791fe
children c745200097dc
files src/if_ruby.c src/version.c
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -1238,6 +1238,11 @@ static VALUE window_set_cursor(VALUE sel
     return Qnil;
 }
 
+static VALUE f_nop(VALUE self)
+{
+    return Qnil;
+}
+
 static VALUE f_p(int argc, VALUE *argv, VALUE self UNUSED)
 {
     int i;
@@ -1259,6 +1264,7 @@ static void ruby_io_init(void)
 
     rb_stdout = rb_obj_alloc(rb_cObject);
     rb_define_singleton_method(rb_stdout, "write", vim_message, 1);
+    rb_define_singleton_method(rb_stdout, "flush", f_nop, 0);
     rb_define_global_function("p", f_p, -1);
 }
 
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    501,
+/**/
     500,
 /**/
     499,