platform/shared/rubyJVM/src/com/xruby/runtime/lang/RubyModule.java in rhodes-2.0.0.beta6 vs platform/shared/rubyJVM/src/com/xruby/runtime/lang/RubyModule.java in rhodes-2.0.0.beta7

- old
+ new

@@ -891,9 +891,22 @@ public RubyValue isConstDefined(RubyValue arg) { RubySymbol s = RubyTypesUtil.convertToSymbol(arg); return RubyAPI.isConstantDefined(this, s.toString()); } + public RubyValue getConstants() + { + RubyArray arRes = new RubyArray(); + j2me.util.Set keys = constants_.keySet(); + Iterator iter = keys.iterator(); + while( iter.hasNext() ) + { + arRes.add( ObjectFactory.createSymbol((String)iter.next())); + } + + return arRes; + } + //@RubyLevelMethod(name="method_defined?") public RubyValue isMethodDefined(RubyValue arg) { RubySymbol s = RubyTypesUtil.convertToSymbol(arg); return RubyAPI.isDefinedNonPrivateMethod(this, s.toString()) != RubyConstant.QNIL ? RubyConstant.QTRUE : RubyConstant.QFALSE;