From 9aa55f59703288290eec1f5ec9d7ac5d81b77c81 Mon Sep 17 00:00:00 2001 From: Masaki Fukushima Date: Wed, 27 Sep 2000 13:50:52 +0000 Subject: [PATCH] fixed destructor bug reported by Nobuyuki Horie git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@898 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules1.1/ruby.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Modules1.1/ruby.cxx b/Source/Modules1.1/ruby.cxx index 84a2ee3e3..735c87d00 100644 --- a/Source/Modules1.1/ruby.cxx +++ b/Source/Modules1.1/ruby.cxx @@ -444,8 +444,12 @@ void RUBY::create_function(char *name, char *iname, SwigType *t, ParmList *l) { int i; /* Ruby needs no destructor wrapper */ - if (current == DESTRUCTOR) + if (current == DESTRUCTOR) { + Wrapper *dummy = NewWrapper(); + emit_func_call(name,t,l,dummy); + DelWrapper(dummy); return; + } char mname[256], inamebuf[256]; int predicate = 0, need_result = 0;