The Ashes
Technology, Science and other news
June 16, 2009
JS.Class 2.1 released
Filed under : General
James Coglan has updated JS.Class, his implementation of Ruby’s object system in JavaScript.
This release includes a Hash implementation, HashSet, an updated Ruby 1.9 Enumerable module with enumerators and Symbol#to_proc functionality, and an improved package loader that supports parallel downloads and runs on SpiderMonkey, Rhino and V8.
Detailed Changes
- New libraries: ConstantScope, Hash and HashSet, a much faster Set implementation.
- The package manager has been improved with a new API, parallel downloading of files, and support for server-side environments such as SpiderMonkey, Rhino and V8. It also supports user-defined loader functions for transparent integration with Google and Yahoo!’s packaging systems.
- The Enumerable module has been updated with plenty of methods from Ruby 1.9, and now supports enumerators, and Symbol#to_proc-like functionality whereby a string, MethodChain or any object that implements toFunction() can be used as an iterator.
- The core object methods now live in Kernel, and we’ve added new methods: tap(), equals(), hash() and enumFor().
- The double inclusion problem is now fixed; no current Ruby implementation seems to support this properly.
- Ancestor and method lookups are now cached so callSuper runs about twice as fast.
- Classes can be named to generate displayName on methods for
use with the WebKit debugger.
Tags :
No Comments