<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,15 +3,15 @@ require File.expand_path(File.join(File.dirname(__FILE__), &quot;/../helper&quot;))
 module Johnson
   class BrowserTest &lt; Johnson::TestCase
     def setup
-      @context = Johnson::Context.new
-      @context.evaluate('Johnson.require(&quot;johnson/browser&quot;);')
+      @runtime = Johnson::Runtime.new
+      @runtime.evaluate('Johnson.require(&quot;johnson/browser&quot;);')
     end
 
     def test_set_location_returns_location
       filename = &quot;file://#{File.expand_path(__FILE__)}&quot;
-      @context.evaluate(&quot;window.location = '#{filename}'&quot;)
+      @runtime.evaluate(&quot;window.location = '#{filename}'&quot;)
       uri = URI.parse(filename)
-      assert_equal(uri.to_s, @context.evaluate('window.location').to_s)
+      assert_equal(uri.to_s, @runtime.evaluate('window.location').to_s)
     end
   end
 end</diff>
      <filename>test/johnson/browser_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,32 +4,32 @@ module Johnson
   module Conversions
     class ArrayTest &lt; Johnson::TestCase
       def setup
-        @context = Johnson::Context.new
+        @runtime = Johnson::Runtime.new
       end
       
       def test_array_index_get
-        @context[:list] = [1, 2, 3, 4]
-        assert_equal(1, @context.evaluate(&quot;list[0]&quot;))
+        @runtime[:list] = [1, 2, 3, 4]
+        assert_equal(1, @runtime.evaluate(&quot;list[0]&quot;))
       end
 
       def test_array_index_set
-        @context[:list] = []
-        @context.evaluate(&quot;list[0] = 42&quot;)
-        assert_equal(42, @context[:list][0])
+        @runtime[:list] = []
+        @runtime.evaluate(&quot;list[0] = 42&quot;)
+        assert_equal(42, @runtime[:list][0])
       end
 
       def test_array_works_with_for_in
         list = [1, 2, 3, 4]
 
-        @context['alert'] = lambda { |x| p x }
-        @context['list'] = list
-        @context.evaluate(&quot;
+        @runtime['alert'] = lambda { |x| p x }
+        @runtime['list'] = list
+        @runtime.evaluate(&quot;
           var new_list = [];
           for(x in list) {
             new_list.push(x + 1);
           }
         &quot;)
-        assert_equal(list.map { |x| x + 1}, @context['new_list'].to_a)
+        assert_equal(list.map { |x| x + 1}, @runtime['new_list'].to_a)
       end
     end
   end</diff>
      <filename>test/johnson/conversions/array_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,17 +4,17 @@ module Johnson
   module Conversions
     class BooleanTest &lt; Johnson::TestCase
       def setup
-        @context = Johnson::Context.new
+        @runtime = Johnson::Runtime.new
       end
       
       def test_truthiness
-        @context[:v] = true
-        assert_same(true, @context.evaluate(&quot;v === true&quot;))
+        @runtime[:v] = true
+        assert_same(true, @runtime.evaluate(&quot;v === true&quot;))
       end
 
       def test_dirty_lies
-        @context[:v] = false
-        assert_same(false, @context.evaluate(&quot;v === true&quot;))
+        @runtime[:v] = false
+        assert_same(false, @runtime.evaluate(&quot;v === true&quot;))
       end
     end
   end</diff>
      <filename>test/johnson/conversions/boolean_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,22 +4,22 @@ module Johnson
   module Conversions
     class CallableTest &lt; Johnson::TestCase
       def setup
-        @context = Johnson::Context.new
+        @runtime = Johnson::Runtime.new
       end
       
       def test_proc_works_in_jsland
-        @context[:squared] = Proc.new { |x| x * x }
+        @runtime[:squared] = Proc.new { |x| x * x }
         assert_js_equal(4, &quot;squared(2)&quot;)
       end
       
       def test_procs_roundtrip
-        @context[:k] = k = lambda { |x| x }
-        assert_same(k, @context.evaluate(&quot;k&quot;))
+        @runtime[:k] = k = lambda { |x| x }
+        assert_same(k, @runtime.evaluate(&quot;k&quot;))
       end
       
       def test_proc_js_function_proxy_gets_reused
-        @context[:k] = k = lambda { |x| x }
-        @context[:kk] = k
+        @runtime[:k] = k = lambda { |x| x }
+        @runtime[:kk] = k
         assert_js(&quot;k === kk&quot;)
       end
       
@@ -30,7 +30,7 @@ module Johnson
       end
       
       def test_anything_with_a_call_method_can_be_called_as_a_method
-        @context[:c] = CallableThing.new
+        @runtime[:c] = CallableThing.new
         assert_js_equal(&quot;foo&quot;, &quot;c()&quot;)
       end
     end</diff>
      <filename>test/johnson/conversions/callable_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,14 +4,14 @@ module Johnson
   module Conversions
     class FileTest &lt; Johnson::TestCase
       def setup
-        @context = Johnson::Context.new
+        @runtime = Johnson::Runtime.new
       end
 
       def test_read_file
         File.open(__FILE__, 'rb') { |f|
-          @context[:foo] = f
-          assert_equal(f, @context.evaluate(&quot;foo&quot;))
-          assert_equal(File.read(__FILE__), @context.evaluate(&quot;foo.read()&quot;))
+          @runtime[:foo] = f
+          assert_equal(f, @runtime.evaluate(&quot;foo&quot;))
+          assert_equal(File.read(__FILE__), @runtime.evaluate(&quot;foo.read()&quot;))
         }
       end
     end</diff>
      <filename>test/johnson/conversions/file_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,20 +4,20 @@ module Johnson
   module Conversions
     class NilTest &lt; Johnson::TestCase
       def setup
-        @context = Johnson::Context.new
+        @runtime = Johnson::Runtime.new
       end
       
       def test_ruby_nil_is_js_null
-        @context[:v] = nil
-        assert_equal(true, @context.evaluate(&quot;v == null&quot;))
+        @runtime[:v] = nil
+        assert_equal(true, @runtime.evaluate(&quot;v == null&quot;))
       end
 
       def test_js_null_is_ruby_nil
-        assert_nil(@context.evaluate(&quot;null&quot;))
+        assert_nil(@runtime.evaluate(&quot;null&quot;))
       end
 
       def test_js_undefined_is_ruby_nil
-        assert_nil(@context.evaluate(&quot;undefined&quot;))
+        assert_nil(@runtime.evaluate(&quot;undefined&quot;))
       end
     end
   end</diff>
      <filename>test/johnson/conversions/nil_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,34 +4,34 @@ module Johnson
   module Conversions
     class NumberTest &lt; Johnson::TestCase
       def setup
-        @context = Johnson::Context.new
+        @runtime = Johnson::Runtime.new
       end
       
       def test_ruby_fixnum_in_js
-        @context[:v] = 42
+        @runtime[:v] = 42
         
         assert_js(&quot;v == 42&quot;)
         assert_js_equal(42, &quot;v&quot;)
-        assert_equal(42, @context[:v])
+        assert_equal(42, @runtime[:v])
       end
       
       def test_js_fixnum_in_ruby
-        fix = @context.evaluate(&quot;42&quot;)
+        fix = @runtime.evaluate(&quot;42&quot;)
         assert_equal(42, fix)
         assert_kind_of(Fixnum, fix)
       end
 
       def test_ruby_float_in_js
-        @context[:pi] = pi = 3.141592654
+        @runtime[:pi] = pi = 3.141592654
         assert_js_equal(pi, &quot;pi&quot;)
-        assert_in_delta(pi, @context.evaluate(&quot;pi&quot;), 2 ** -20)
+        assert_in_delta(pi, @runtime.evaluate(&quot;pi&quot;), 2 ** -20)
       end
       
       def test_ruby_bignum_in_js
-        @context[:big] = big = 2 ** 200        
+        @runtime[:big] = big = 2 ** 200        
         
         assert_js_equal(big, &quot;big&quot;)
-        assert_kind_of(Float, @context.evaluate(&quot;big&quot;))
+        assert_kind_of(Float, @runtime.evaluate(&quot;big&quot;))
       end
     end
   end</diff>
      <filename>test/johnson/conversions/number_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,24 +4,24 @@ module Johnson
   module Conversions
     class RegexpTest &lt; Johnson::TestCase
       def setup
-        @context = Johnson::Context.new
+        @runtime = Johnson::Runtime.new
       end
 
       def test_regex_converts
-        @context[:x] = /aaron/
-        @context[:y] = /john/i
-        assert @context.evaluate('&quot;aaron&quot;.match(x)')
-        assert !@context.evaluate('&quot;Aaron&quot;.match(x)')
-        assert @context.evaluate('&quot;john&quot;.match(y)')
-        assert @context.evaluate('&quot;John&quot;.match(y)')
+        @runtime[:x] = /aaron/
+        @runtime[:y] = /john/i
+        assert @runtime.evaluate('&quot;aaron&quot;.match(x)')
+        assert !@runtime.evaluate('&quot;Aaron&quot;.match(x)')
+        assert @runtime.evaluate('&quot;john&quot;.match(y)')
+        assert @runtime.evaluate('&quot;John&quot;.match(y)')
       end
 
       def test_regex_roundtrips
-        @context[:x] = /aaron/
-        assert_equal(/aaron/, @context.evaluate('x'))
+        @runtime[:x] = /aaron/
+        assert_equal(/aaron/, @runtime.evaluate('x'))
 
-        @context[:x] = /aaron/m
-        assert_equal(/aaron/m, @context.evaluate('x'))
+        @runtime[:x] = /aaron/m
+        assert_equal(/aaron/m, @runtime.evaluate('x'))
       end
     end
   end</diff>
      <filename>test/johnson/conversions/regexp_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,26 +4,26 @@ module Johnson
   module Conversions
     class StringTest &lt; Johnson::TestCase
       def setup
-        @context = Johnson::Context.new
+        @runtime = Johnson::Runtime.new
       end
       
       def test_ruby_string_in_js
-        @context[:v] = &quot;foo&quot;
+        @runtime[:v] = &quot;foo&quot;
         assert_js(&quot;'foo' == v&quot;)
       end
 
       def test_js_string_in_ruby
-        assert_equal(&quot;foo&quot;, @context.evaluate(&quot;'foo'&quot;))
+        assert_equal(&quot;foo&quot;, @runtime.evaluate(&quot;'foo'&quot;))
       end
 
       def test_roundtrip
-        @context[:v] = v = &quot;hola&quot;
-        assert_equal(v, @context.evaluate(&quot;v&quot;))
+        @runtime[:v] = v = &quot;hola&quot;
+        assert_equal(v, @runtime.evaluate(&quot;v&quot;))
       end
       
       def test_strings_are_copies
-        @context[:v] = v = &quot;hola&quot;
-        assert_not_same(v, @context.evaluate(&quot;v&quot;))
+        @runtime[:v] = v = &quot;hola&quot;
+        assert_not_same(v, @runtime.evaluate(&quot;v&quot;))
       end
     end
   end</diff>
      <filename>test/johnson/conversions/string_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,15 +4,15 @@ module Johnson
   module Conversions
     class StructTest &lt; Johnson::TestCase
       def setup
-        @context = Johnson::Context.new
+        @runtime = Johnson::Runtime.new
       end
 
       def test_use_struct
         f = Struct.new(:phil_collins).new
         f.phil_collins = 'awesome'
-        @context[:foo] = f
-        assert_equal(f, @context.evaluate('foo'))
-        assert_equal('awesome', @context.evaluate('foo.phil_collins'))
+        @runtime[:foo] = f
+        assert_equal(f, @runtime.evaluate('foo'))
+        assert_equal('awesome', @runtime.evaluate('foo.phil_collins'))
       end
     end
   end</diff>
      <filename>test/johnson/conversions/struct_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,19 +4,19 @@ module Johnson
   module Conversions
     class SymbolTest &lt; Johnson::TestCase
       def setup
-        @context = Johnson::Context.new
+        @runtime = Johnson::Runtime.new
       end
 
       def test_symbols_are_interned
-        @context[:v] = :symbol
-        @context[:x] = :symbol
+        @runtime[:v] = :symbol
+        @runtime[:x] = :symbol
 
-        assert(@context.evaluate(&quot;v !== null &amp;&amp; v === x&quot;))
+        assert(@runtime.evaluate(&quot;v !== null &amp;&amp; v === x&quot;))
       end
 
       def test_ruby_symbol_roundtrips
-        @context[:v] = :foo
-        assert_equal(:foo, @context.evaluate(&quot;v&quot;))
+        @runtime[:v] = :foo
+        assert_equal(:foo, @runtime.evaluate(&quot;v&quot;))
       end
     end
   end</diff>
      <filename>test/johnson/conversions/symbol_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,17 @@ module Johnson
         @runtime['thread'] = thread
         assert_js_equal(false, &quot;thread.send('alive?')&quot;)
       end
+
+      def test_new_js_thread
+        @runtime.evaluate('function testing() { Ruby.sleep(10); }')
+        @runtime.evaluate('new Ruby.Thread(function() { testing(); })')
+      end
+
+      def test_js_thread_read_file
+        @runtime['filename'] = File.expand_path(__FILE__)
+        @runtime.evaluate('function testing() { Ruby.File.read(filename); }')
+        @runtime.evaluate('new Ruby.Thread(function() { testing(); })')
+      end
     end
   end
 end</diff>
      <filename>test/johnson/conversions/thread_test.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>todo/threading_test.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>4507bf52e909971dd1184256e0cfba3429ac3d3a</id>
    </parent>
  </parents>
  <author>
    <name>Aaron Patterson</name>
    <email>aaron.patterson@gmail.com</email>
  </author>
  <url>http://github.com/jbarnette/johnson/commit/5bcd3531d7a01d190bc99130ae1dd44964b800eb</url>
  <id>5bcd3531d7a01d190bc99130ae1dd44964b800eb</id>
  <committed-date>2008-05-30T16:59:45-07:00</committed-date>
  <authored-date>2008-05-30T16:59:45-07:00</authored-date>
  <message>THEY ALL FUCKING WORK</message>
  <tree>2724315216ef6dcc00fe49f4f4f086a8584e46a9</tree>
  <committer>
    <name>Aaron Patterson</name>
    <email>aaron.patterson@gmail.com</email>
  </committer>
</commit>
