<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,4 @@
-#include &lt;phuby_conversions.h&gt;
+#include &lt;phuby.h&gt;
 
 zval * Phuby_value_to_zval(VALUE rt, VALUE value)
 {
@@ -26,17 +26,31 @@ zval * Phuby_value_to_zval(VALUE rt, VALUE value)
       ZVAL_STRINGL(php_value, StringValuePtr(value), RSTRING_LEN(value), 1);
       break;
     case T_OBJECT:
+    case T_DATA:
       {
         object_init_ex(php_value, php_ruby_proxy);
         VALUE map = rb_iv_get(rt, &quot;@proxy_map&quot;);
         rb_hash_aset(map, INT2NUM((int)php_value), value);
       }
       break;
+    case T_ARRAY:
+      {
+        array_init(php_value);
+        int i;
+        for(i = 0; i &lt; RARRAY_LEN(value); i++) {
+          VALUE key = rb_funcall(INT2NUM(i), rb_intern(&quot;to_s&quot;), 0);
+          VALUE thing = RARRAY_PTR(value)[i];
+          add_assoc_zval(php_value, StringValuePtr(key), Phuby_value_to_zval(rt, thing));
+        }
+        VALUE map = rb_iv_get(rt, &quot;@proxy_map&quot;);
+        rb_hash_aset(map, INT2NUM((int)php_value), value);
+      }
+      break;
     case T_NIL:
       ZVAL_NULL(php_value);
       break;
     default:
-      rb_raise(rb_eRuntimeError, &quot;Can't convert ruby object: %d&quot;, TYPE(value));
+      rb_raise(rb_eRuntimeError, &quot;Can't convert ruby object: %s %d&quot;, rb_class2name(CLASS_OF(value)), TYPE(value));
   }
 
   return php_value;</diff>
      <filename>ext/phuby/phuby_conversions.c</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,15 @@
 require 'helper'
 
 class TestArray &lt; Phuby::TestCase
+  def test_move_to_runtime
+    Phuby::Runtime.php do |rt|
+      rt['foo'] = [1,2,3]
+      assert_equal 1, rt['foo'][0]
+      assert_equal 2, rt['foo'][1]
+      assert_equal 3, rt['foo'][2]
+    end
+  end
+
   def test_array_length
     Phuby::Runtime.php do |rt|
       rt.eval('$get_length = count($_GET);')</diff>
      <filename>test/test_array.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,6 +17,12 @@ class TestObject &lt; Phuby::TestCase
     end
   end
 
+  def test_stringio
+    Phuby::Runtime.php do |rt|
+      rt['x'] = StringIO.new('')
+    end
+  end
+
   def test_method_call
     x = FunObject.new
     Phuby::Runtime.php do |rt|</diff>
      <filename>test/test_object.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c71ae05e51e45dd19172d7094357ece916386ee1</id>
    </parent>
    <parent>
      <id>6c8d3502cdb71811dfefb4c8f817708abe34f486</id>
    </parent>
  </parents>
  <author>
    <name>Ryan Davis</name>
    <email>ryand-ruby@zenspider.com</email>
  </author>
  <url>http://github.com/tenderlove/phuby/commit/334bb3d0d628efd1f241c7c856cc553d975ef0b0</url>
  <id>334bb3d0d628efd1f241c7c856cc553d975ef0b0</id>
  <committed-date>2009-10-26T13:34:56-07:00</committed-date>
  <authored-date>2009-10-26T13:34:56-07:00</authored-date>
  <message>Merge branch 'master' of github.com:tenderlove/phuby

* 'master' of github.com:tenderlove/phuby:
  switching to rack::utils
  cleaning up the php handler
  a rack adapter for phuby
  arrays move across</message>
  <tree>d94c4a9fa525337eb6cfe021aeb5333d978d4b85</tree>
  <committer>
    <name>Ryan Davis</name>
    <email>ryand-ruby@zenspider.com</email>
  </committer>
</commit>
