Git commit aa42b745c80b176320ae2ed478ec5ba3c371d305 by Alexander Dymo. Committed on 26/10/2012 at 15:59. Pushed by dymo into branch 'master'. Always create context for the function body, even if it's empty. This is what c++ does and this is what other plugins (like filetemplates) r= ely on. M +2 -2 duchain/builders/contextbuilder.cpp http://commits.kde.org/kdev-ruby/aa42b745c80b176320ae2ed478ec5ba3c371d305 diff --git a/duchain/builders/contextbuilder.cpp b/duchain/builders/context= builder.cpp index b2073c6..cc59197 100644 --- a/duchain/builders/contextbuilder.cpp +++ b/duchain/builders/contextbuilder.cpp @@ -195,8 +195,8 @@ void ContextBuilder::visitMethodStatement(RubyAst *node) } = node->tree =3D aux->l; + DUContext *body =3D openContext(node, DUContext::Other, &name); if (node->tree && is_valid(node->tree)) { - DUContext *body =3D openContext(node, DUContext::Other, &name); if (compilingContexts()) { DUChainWriteLocker wlock(DUChain::lock()); if (params) @@ -204,8 +204,8 @@ void ContextBuilder::visitMethodStatement(RubyAst *node) body->setInSymbolTable(false); } visitBody(node); - closeContext(); } + closeContext(); node->tree =3D aux; } =20