Find file
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (21 sloc) 903 Bytes

The Clojure Gem


Use Clojure's immutable data structures and Software Transactional Memory from Ruby. Don't be afraid of concurrency.

Requires JRuby. Tested with 1.4.0+.

Supports all four persistent collection types (lists, vectors, maps, and sets). Many enumerable methods still return Ruby arrays instead of the original type; this will be fixed. Lazy sequences are not yet supported.


JRuby's way of nesting exceptions means that the exceptions used for transaction retries in dosync are not caught correctly. This may necessitate shipping a patched version of Clojure to fix. See the test_threaded_refs test in test_ref.rb for details; changing “commute” to “alter” makes it fail.


TODO: write examples


Copyright © Phil Hagelberg 2009

Released under the Eclipse Public License. See file COPYING.