IronRuby.Tests.Tests.Symbols1 C# (CSharp) Method

Symbols1() public method

public Symbols1 ( ) : void
return void
        public void Symbols1() {
            byte[] bytes = Encoding.UTF8.GetBytes("α");

            RubySymbol a, b;
#if OBSOLTE
            a = Context.CreateSymbolInternal(MutableString.CreateBinary(bytes, RubyEncoding.Binary));
            b = Context.CreateSymbolInternal(MutableString.CreateBinary(bytes, RubyEncoding.KCodeSJIS));
            c = Context.CreateSymbolInternal(MutableString.CreateBinary(bytes, RubyEncoding.KCodeUTF8));
            d = Context.CreateSymbolInternal(MutableString.Create("α", RubyEncoding.KCodeUTF8));

            Assert(a.Equals(b));
            Assert(a.Equals(c));
            Assert(a.Equals(d));
#endif
            a = Context.CreateSymbol(MutableString.CreateBinary(Encoding.ASCII.GetBytes("foo"), RubyEncoding.Binary), false);
            b = Context.CreateSymbol(MutableString.CreateMutable("foo", RubyEncoding.UTF8), false);
            Assert(a.Equals(b));
        }
        
Tests