   (org.jruby.RubyString/newString (ruby) s))
 
 (defmethod ->ruby
+  org.bson.types.ObjectId [id]
+  (send (get-class (get-module "BSON") "ObjectId") :from_string (.toString id)))
+
+(defmethod ->ruby
   java.lang.Float [n]
   (org.jruby.RubyFloat. (ruby) n))
 

  nil [n]
  (-> (ruby) (.getNil)))

(fact "conversions work"
  (->ruby nil) => (eval "nil")
  (->ruby "a string") => (eval "'a string'")

  (:require fs)
  (:use midje.sweet))

(declare eval ruby get-class get-module)

(defn new-runtime []
  (let [config (doto (org.jruby.RubyInstanceConfig.)
