@@ -253,11 +253,12 @@ static void ruby_vim_init(void);
253253# define rb_hash_new dll_rb_hash_new
254254# define rb_inspect dll_rb_inspect
255255# define rb_int2inum dll_rb_int2inum
256- # ifdef RUBY19_OR_LATER
257- # define rb_intern2 dll_rb_intern2
258- # else
259- # define rb_intern dll_rb_intern
260- # endif
256+
257+ // ruby.h may redefine rb_intern to use RUBY_CONST_ID_CACHE(), but that won't
258+ // work. Not using the cache appears to be the best solution.
259+ # undef rb_intern
260+ # define rb_intern dll_rb_intern
261+
261262# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
262263# if defined(DYNAMIC_RUBY_VER ) && DYNAMIC_RUBY_VER <= 18
263264# define rb_fix2int dll_rb_fix2int
@@ -392,11 +393,7 @@ static VALUE (*dll_rb_hash_aset) (VALUE, VALUE, VALUE);
392393static VALUE (* dll_rb_hash_new ) (void );
393394static VALUE (* dll_rb_inspect ) (VALUE );
394395static VALUE (* dll_rb_int2inum ) (long );
395- # ifdef RUBY19_OR_LATER
396- static ID (* dll_rb_intern2 ) (const char * , long );
397- # else
398396static ID (* dll_rb_intern ) (const char * );
399- # endif
400397# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
401398static long (* dll_rb_fix2int ) (VALUE );
402399static long (* dll_rb_num2int ) (VALUE );
@@ -596,11 +593,7 @@ static struct
596593 {"rb_hash_new" , (RUBY_PROC * )& dll_rb_hash_new },
597594 {"rb_inspect" , (RUBY_PROC * )& dll_rb_inspect },
598595 {"rb_int2inum" , (RUBY_PROC * )& dll_rb_int2inum },
599- # ifdef RUBY19_OR_LATER
600- {"rb_intern2" , (RUBY_PROC * )& dll_rb_intern2 },
601- # else
602596 {"rb_intern" , (RUBY_PROC * )& dll_rb_intern },
603- # endif
604597# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
605598 {"rb_fix2int" , (RUBY_PROC * )& dll_rb_fix2int },
606599 {"rb_num2int" , (RUBY_PROC * )& dll_rb_num2int },
0 commit comments