<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,6 @@
 This is the Red Sun Ruby library. It can parse and write SWF files and can translate Ruby code into AS3 code inside a SWF.
 
-It doesn't work yet...
+It works moderately well...
 
 (c) Jonathan Branam, 2008
 </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -4,6 +4,8 @@ import com.adobe.serialization.json.JSONDecoder;
 
 import flash.display.DisplayObject;
 import flash.display.Sprite;
+import flash.text.TextField;
+import flash.text.TextFormat;
 
 /**
  * Class for core ruby methods.
@@ -102,7 +104,7 @@ public class RubyCore
 
   public function run_func(doc_class:DisplayObject, local_size:int, stack_max:int, block:Function):void  {
     init();
-    variable_c.rb_define_global_const(&quot;Document&quot;, wrap_flash_obj(doc_class));
+    variable_c.rb_define_global_const(&quot;TopSprite&quot;, wrap_flash_obj(doc_class));
     eval_c.ruby_run_node(iseqval_from_func(local_size, stack_max, block));
   }
 
@@ -119,7 +121,7 @@ public class RubyCore
   public function run_iseqval(iseqval:Value, doc_class:DisplayObject=null):void {
     init();
     if (doc_class) {
-      variable_c.rb_define_global_const(&quot;Document&quot;, wrap_flash_obj(doc_class));
+      variable_c.rb_define_global_const(&quot;TopSprite&quot;, wrap_flash_obj(doc_class));
     }
     eval_c.ruby_run_node(iseqval);
   }
@@ -258,6 +260,7 @@ public class RubyCore
 
   public var rb_mFlash:RClass;
   public var rb_mFlashDisplay:RClass;
+  public var rb_mFlashText:RClass;
 
   public function
   init_flash_classes():void
@@ -271,6 +274,9 @@ public class RubyCore
     rb_mFlash = class_c.rb_define_module(&quot;Flash&quot;);
     rb_mFlashDisplay = class_c.rb_define_module_under(rb_mFlash, &quot;Display&quot;);
     variable_c.rb_const_set(rb_mFlashDisplay, parse_y.rb_intern(&quot;Sprite&quot;), wrap_flash_class(Sprite));
+    rb_mFlashText = class_c.rb_define_module_under(rb_mFlash, &quot;Text&quot;);
+    variable_c.rb_const_set(rb_mFlashText, parse_y.rb_intern(&quot;TextField&quot;), wrap_flash_class(TextField));
+    variable_c.rb_const_set(rb_mFlashText, parse_y.rb_intern(&quot;TextFormat&quot;), wrap_flash_class(TextFormat));
   }
 
   public function</diff>
      <filename>flash/src/ruby/internals/RubyCore.as</filename>
    </modified>
    <modified>
      <diff>@@ -70,6 +70,12 @@ public class RubyFrame
       reg_sp.push(rc.string_c.rb_str_new(val));
     } else if (val is Number) {
       reg_sp.push(rc.numeric_c.INT2FIX(val));
+    } else if (val === rc.Qfalse) {
+      reg_sp.push(val);
+    } else if (val === rc.Qtrue) {
+      reg_sp.push(val);
+    } else {
+      rc.error_c.rb_bug(&quot;Unknown object sent to putobject: &quot; + val);
     }
   }
 
@@ -143,12 +149,10 @@ public class RubyFrame
     recv = ((flag &amp; RbVm.VM_CALL_FCALL_BIT) != 0) ? reg_cfp.self : reg_sp.topn(num);
     klass = rc.CLASS_OF(recv);
 
-    /*
     trace(&quot;send &quot;+op_str+&quot; to &quot; + (klass ? klass.name : &quot;?&quot;) + &quot; with &quot; + op_argc+ &quot; ops&quot;);
     for (var o:int = op_argc-1; o &gt;= 0; o--) {
       trace(&quot;       op &quot;+(op_argc-o)+&quot;: &quot; + reg_sp.topn(o));
     }
-    */
 
 
     mn = rc.vm_insnhelper_c.vm_method_search(id, klass, ic);
@@ -410,6 +414,14 @@ public class RubyFrame
     reg_sp.push(val);
   }
 
+  // insns.def:712
+  public function
+  setn(n:int):void
+  {
+    var val:Value = reg_sp.topn(0);
+    reg_sp.set_topn(n-1, val);
+    reg_sp.push(val);
+  }
 
 }
 }</diff>
      <filename>flash/src/ruby/internals/RubyFrame.as</filename>
    </modified>
    <modified>
      <diff>@@ -92,6 +92,10 @@ public class StackPointer extends Value
     return stack[index-n-1];
   }
 
+  public function set_topn(n:int, val:*):void {
+    stack[index-n-1] = val;
+  }
+
   public function clone_from_top(n:int):StackPointer {
     if (n &lt; 0) {
       throw new Error(&quot;clone_from_top expects a positive value.&quot;);</diff>
      <filename>flash/src/ruby/internals/StackPointer.as</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@ class MainController &lt; Ramaze::Controller
   end
 
   def compile
-    puts &quot;request #{ request.POST() }&quot;
+    #puts &quot;request #{ request.POST() }&quot;
     bytecode = request.POST()[&quot;bytecode&quot;].tr(&quot;\r&quot;,&quot;\n&quot;)
     bc = RubyVM::InstructionSequence.compile(bytecode).to_a
     RedSun::ABC::ABCFile.yarv_to_string(bc)</diff>
      <filename>lib/redsun/ramaze.rb</filename>
    </modified>
    <modified>
      <diff>@@ -291,3 +291,13 @@ Todo:
 - implement operators
 - work on Asterism rendering
 
+10/29/2008
+
+Update: Executing large blocks of Ruby code is now working successfully. 
+Arrays work with a few very basic operations. Calling to and from Flash
+objects and classes has been improved. A Ramaze webapp was written that
+will compile Ruby bytecode either on the harddrive or passed to it as
+POST data.
+
+AIR client developed which can browse for Ruby source to execute or send
+arbitrary Ruby code directly. It runs the Ruby in a new window.</diff>
      <filename>plan.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,16 @@
 a = [1,1,1]
-Document.graphics.lineStyle(a[0], a[1], a[2])
-Document.graphics.beginFill(0x33AAEE)
-Document.graphics.drawRect(5,5,105,105)
+TopSprite.graphics.lineStyle(a[0], a[1], a[2])
+TopSprite.graphics.beginFill(0x33AAEE)
+TopSprite.graphics.drawRect(5,5,105,105)
+tf = Flash::Text::TextField.new
+tf.text = &quot;Hello!&quot;
+tf.x = 40
+tf.y = 50
+tf.selectable = false
+tfor = Flash::Text::TextFormat.new
+tfor.size = 25
+tf.setTextFormat(tfor)
+TopSprite.addChild(tf)
 =begin
 module Sketch
   def geometry &amp;m</diff>
      <filename>research/scope.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f4f49efe1001322aa4dd7a5077ce64e11295b3f8</id>
    </parent>
  </parents>
  <author>
    <name>Jonathan Branam</name>
    <email>github@jonathanbranam.net</email>
  </author>
  <url>http://github.com/jonathanbranam/redsun/commit/8aa76a6af84bfaa51ebae9f314a4246dabd55753</url>
  <id>8aa76a6af84bfaa51ebae9f314a4246dabd55753</id>
  <committed-date>2008-10-29T10:35:57-07:00</committed-date>
  <authored-date>2008-10-29T10:35:57-07:00</authored-date>
  <message>Adding text support, fixing a bug with putobject.
Adding mapping for Flash text classes.
Fixed bug in putobject that was not converting true and false literals.
Added setn opcode.</message>
  <tree>a96ede7392300511ac37069a61e0d10277e86cdd</tree>
  <committer>
    <name>Jonathan Branam</name>
    <email>github@jonathanbranam.net</email>
  </committer>
</commit>
