public Set<String> discoverInstanceVariables() {
HashSet<String> set = new HashSet();
RubyModule cls = this;
while (cls != null) {
for (DynamicMethod method : cls.getNonIncludedClass().getMethodLocation().getMethods().values()) {
MethodData methodData = method.getMethodData();
set.addAll(methodData.getIvarNames());
}
if (cls instanceof RubyClass) {
cls = ((RubyClass)cls).getSuperClass();
} else {