Um, only the second example involved anything that looks like autoboxing. (And that one did not involve autoboxing, as pvande pointed out it was a parsing issue.) The first was a case where JavaScript is not using available hooks in places where it makes sense to do so, and the third was a case where JavaScript simply does not provide conveniently placed hooks.
But if your complaint with Ruby's OO system is that it cannot easily implement a prototyped system, that's like saying that Perl is more OO than JavaScript because it is easier to implement a prototyped system in Perl than to implement multiple inheritance in JavaScript. This is true, but irrelevant - Perl's support for OO everywhere is not as pervasive as JavaScript's.
Furthermore you're mistaken. I found a trivial implementation here:
Proto = Class.new(Class) # Beware: magic.
def Proto.clone
Class.new(self)
end
While I don't doubt that there are many good class implementations in JavaScript, I doubt that any are as short and cute as this prototype implementation in Ruby. Follow the link for a demonstration of usage. While I have to admire how cleverly it ties objects to classes, it unfortunately doesn't work with ancient versions of Ruby such as the one I have on my computer. (Ruby 1.6.8 complains that you can't create a subclass of Class. That version is from 2002.)
There is also prototype in the Ruby gems library. I didn't like some things about it (in particular it looks like it doesn't support noticing that the prototype changed), so I implemented my own reasonably full-featured system using a minimum of strange magic that works even in ancient versions of Ruby: |