"To check for a match of a string s with a regular expression in Ruby, use the ~= operator,"
should be "use the =~ operator". (Ruby isn't D!)
And the example which says:
sub(s, "[ar]",
delegate char[] (RegExp m)
{
return toupper(m.match(0));
},
"g"); // result: StRAp A Rocket engine on A chicken.
would be even more impressive with the new delegate syntax as:
sub(s, "[ar]",
(RegExp m) { return toupper(m.match(0)); },
"g"); // result: StRAp A Rocket engine on A chicken.
Optional: mention that toupper() comes from std.string.