According to the pickaxe book (page 64), this:

text = "fred:smith"
puts text.sub(/(\w+):(\w+)/, "\2, \1")

should print "smith:fred", but on my system it prints ", ". Ruby
-version returns:

ruby 1.6.6 (2001-12-13) [powerpc-darwin5.1]

What's going on here? Is it a bug? A change in the language? I've
looked around for a list of changes since version 1.6, but all I could
find was the ChangeLog which isn't very helpful.

  -- Jesse