TL;DR¶
Run gem install coderay
because 0.9.5 > 0.9.4.
Support for another Ruby engine!¶
I'm proud to announce that CodeRay now officially supports Rubinius, the crazy Ruby-in-Ruby-on-LLVM implementation. However, there's a little problem with the current release (1.1.0). The previous version (1.0.1) and the soon-to-be-released version (1.1.1) are supported, but not this one.
The CodeRay homepage now also has a list of supported Ruby engines.

- diff code no longer produces invalid HTML.
- Ruby multibyte tokens are now highlighted correctly and consistently on all Ruby engines.
- Improved support of Ruby 1.9 encodings; please always give UTF-8 strings to CodeRay. Invalid chars do not crash the scanner, but will produce
?
symbols in the output.
- Ruby 1.9 syntax: The new Hash syntax (
{ a: b }
) and the lambda shortcut (->
) are now highlighted correctly.
Upgrading from 0.9.4 should not cause any problems. Read the full list of changes in the Wiki.
This release was tested with Ruby 1.8.6-p399, 1.8.7-p302, 1.9.1-p378, 1.9.2-p0, JRuby 1.5.2, and Rubinius 1.0.1 (all x86_64).
Distributions¶
World domination progress¶
CodeRay 0.9.4 has been downloaded 7,686 times since August 31 (that's about 280 times per day).
The Read Ruby book project (by runpaint) is now using CodeRay instead of Pygments to simplify the compilation process.
Thanks¶
This release is codenamed Germany.rb, because it was an awesome usergroup meeting and I have got lots of ideas and support from there. I thank Florian Gilcher for hints on Rubinius and Ruby 1.9 encodings, and Jan Lelis for reminding me of the Ruby 1.9 lambda shortcut ;)
I've given a presentation on the history of CodeRay development at the Germany.rb (slides).
Future¶
1.0 is also in progress. I've tweaked the Ruby scanner again, and it's now capable of scanning the entire source code of Rails 1.2 (about 2.7 MB) in just under 1 second (using MRI 1.9.2 in my i7 iMac), which means it is 40% faster than the current stable release.
Support for new languages¶
I know, you don't care about speed, or tweaks, or obscure details, or little bugfixes. You want new languages. I really recommend you use Pygments then.
As for me, I'm travelling to New Zealand starting October 24, and won't come back to Berlin until 2011. I don't plan to write a lot of code while wandering on the tracks of the Fellowship, which means CodeRay 1.0 will not be released this year. That also means you will have to wait for new languages (which are planned for 1.1).
If you don't want to wait, go ahead and do it yourself! Write a scanner, put it on GitHub, and release it as a gem. The community will thank you, and if your scanner is awesome, I will be happy to include it in the distribution.
Any feedback is welcome!