class BasicObject
  def initialize(*args)
    nil
  end

  def ==(other)
    `self === other`
  end

  def __send__(symbol, *args, &block)
    `
      var meth = self[mid_to_jsid(symbol)];

      if (meth) {
        args.unshift(null);
        return meth.apply(self, args);
      }
      else {
        throw new Error("method missing yielder for " + symbol + " in __send__");
      }
    `
  end

  alias_method :send, :__send__

  alias_method :eql?, :==
  alias_method :equal?, :==

  def instance_eval(string = nil, &block)
    `
      if (block === nil) rb_raise(RubyArgError, 'block not supplied');
      return block.call(self, null);
    `
  end

  def instance_exec(*args, &block)
    `
      if (block === nil) rb_raise(RubyArgError, 'block not supplied');
      args.unshift(null);
      return block.apply(self, args);
    `
  end

  def method_missing(symbol, *args)
    raise NoMethodError, "undefined method `#{symbol}` for #{self.inspect}"
  end

  def singleton_method_added(symbol)
    nil
  end

  def singleton_method_removed(symbol)
    nil
  end

  def singleton_method_undefined(symbol)
    nil
  end
end

class BasicObject
  def initialize(*args)
    # nothing ...
  end

  def ==(other)
    `self === other`
  end

  def __send__(symbol, *args, &block)
    `
      var meth = self[mid_to_jsid(symbol)];

      if (meth) {
        return meth.apply(self, args);
      }
      else {
        throw new Error("method missing yielder for " + symbol + " in __send__");
      }
    `
  end

  alias_method :send, :__send__

  alias_method :eql?, :==
  alias_method :equal?, :==

  def instance_eval(string = nil, &block)
    raise ArgumentError, 'block not supplied' unless block_given?

    `return block.call(self);`
  end

  def instance_exec(*args, &block)
    raise ArgumentError, 'block not supplied' unless block_given?

    `
      return block.apply(self, args);
    `
  end

  def method_missing(symbol, *args)
    raise NoMethodError, "undefined method `#{symbol}` for #{self.inspect}"
  end

  def singleton_method_added(symbol)
    # nothing ...
  end

  def singleton_method_removed(symbol)
    # nothing ...
  end

  def singleton_method_undefined(symbol)
    # nothing ...
  end
end

--- 
+++ 
@@ -1,6 +1,6 @@
 class BasicObject
   def initialize(*args)
-    # nothing ...
+    nil
   end
 
   def ==(other)
@@ -12,6 +12,7 @@
       var meth = self[mid_to_jsid(symbol)];
 
       if (meth) {
+        args.unshift(null);
         return meth.apply(self, args);
       }
       else {
@@ -26,15 +27,16 @@
   alias_method :equal?, :==
 
   def instance_eval(string = nil, &block)
-    raise ArgumentError, 'block not supplied' unless block_given?
-
-    `return block.call(self);`
+    `
+      if (block === nil) rb_raise(RubyArgError, 'block not supplied');
+      return block.call(self, null);
+    `
   end
 
   def instance_exec(*args, &block)
-    raise ArgumentError, 'block not supplied' unless block_given?
-
     `
+      if (block === nil) rb_raise(RubyArgError, 'block not supplied');
+      args.unshift(null);
       return block.apply(self, args);
     `
   end
@@ -44,14 +46,14 @@
   end
 
   def singleton_method_added(symbol)
-    # nothing ...
+    nil
   end
 
   def singleton_method_removed(symbol)
-    # nothing ...
+    nil
   end
 
   def singleton_method_undefined(symbol)
-    # nothing ...
+    nil
   end
 end
Clean up basic object and reflect new method sending (inc block)
