Commit: patch 9.1.2091: Ruby integration does not work correctly

0 views
Skip to first unread message

Christian Brabandt

unread,
Jan 18, 2026, 3:31:21 PM (14 hours ago) Jan 18
to vim...@googlegroups.com
patch 9.1.2091: Ruby integration does not work correctly

Commit: https://github.com/vim/vim/commit/3b67993a64ba1e74da9e2b456228d875d4624b6f
Author: Christian Brabandt <c...@256bit.org>
Date: Sun Jan 18 14:03:41 2026 +0000

patch 9.1.2091: Ruby integration does not work correctly

Problem: Ruby headers define HAVE_FSYNC, which leaks into Vim sources
on Windows and changes conditional compilation of buf_T. This
causes struct layout mismatches in if_ruby.c and results in a
different offset for the b_p_bl property, making Vim::Buffer
access fail (after v9.1.2024)
Solution: Undefine HAVE_FSYNC after including the Ruby headers.

related: #19019
closes: #19206

Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/if_ruby.c b/src/if_ruby.c
index 60ca11188..b5b0079ec 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -179,6 +179,9 @@
#ifdef HAVE_DUP
# undef HAVE_DUP
#endif
+#ifdef HAVE_FSYNC
+# undef HAVE_FSYNC
+#endif

// Avoid redefining TRUE/FALSE in vterm.h.
#ifdef TRUE
diff --git a/src/version.c b/src/version.c
index ee2910062..b85579b95 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2091,
/**/
2090,
/**/
Reply all
Reply to author
Forward
0 new messages