package com.xruby.runtime.lang;

public abstract class RubyConstant extends RubySpecialValue {
	public static RubyConstant QFALSE = new RubyConstant() {
		public RubyClass getRubyClass() {
			return RubyRuntime.FalseClassClass;
		}

		public boolean isTrue() {
			return false;
		}		
	};
	
	public static RubyConstant QTRUE = new RubyConstant() {
		public RubyClass getRubyClass() {
			return RubyRuntime.TrueClassClass;
		}
	};
	
	public static RubyConstant QNIL = new RubyConstant() {
		public RubyClass getRubyClass() {
			return RubyRuntime.NilClassClass;
		}
		
		public boolean isTrue() {
			return false;
		}
	};
	
	private RubyConstant() {}
}

@@ -77,24 +77,20 @@
 Ruby
-SpecialValue %7B%0A%09
+Basic %7B%0A    
 publ
@@ -142,58 +142,8 @@
 ant(
-) %7B%0A%09%09public RubyClass getRubyClass() %7B%0A%09%09%09return 
 Ruby
@@ -169,17 +169,20 @@
 lass
-;%0A%09%09%7D%0A%0A%09%09
+) %7B%0A        
 publ
@@ -195,35 +195,44 @@
 lean isTrue() %7B%0A
-%09%09%09
+            
 return false;%0A%09%09
@@ -233,21 +233,30 @@
 se;%0A
-%09%09%7D%09%09%0A%09%7D;%0A%09%0A%09
+        %7D%0A    %7D;%0A%0A    
 publ
@@ -307,97 +307,119 @@
 ant(
-) %7B%0A%09%09public RubyClass getRubyClass() %7B%0A%09%09%09return RubyRuntime.TrueClassClass;%0A%09%09%7D%0A%09%7D;%0A%09%0A%09
+RubyRuntime.TrueClassClass) %7B%0A        public boolean isTrue() %7B%0A            return true;%0A        %7D%0A    %7D;%0A%0A    
 publ
@@ -469,58 +469,8 @@
 ant(
-) %7B%0A%09%09public RubyClass getRubyClass() %7B%0A%09%09%09return 
 Ruby
@@ -494,19 +494,20 @@
 lass
-;%0A%09%09%7D%0A%09%09%0A%09%09
+) %7B%0A        
 publ
@@ -532,11 +532,20 @@
 ) %7B%0A
-%09%09%09
+            
 retu
@@ -558,43 +558,74 @@
 se;%0A
-%09%09%7D%0A%09%7D;%0A%09%0A%09private RubyConstant() %7B
+        %7D%0A    %7D;%0A%0A    private RubyConstant(RubyClass c) %7Bsuper(c);
 %7D%0A%7D%0A

true, false, nil can have singleton method