We'll respond shortly.
On Ruby 1.8, strings are sequences of bytes. On Ruby 1.9, strings are proper characters (not bytes!). Even if your app only speaks “American”, you still need to be aware of this to handle data properly. Plus, some of the new syntax in 1.9 is not backwards compatible with 1.8.
Recommended steps for upgrading from 1.8 to 1.9:
Prawn only officially supports 1.8.6 and 1.9.1 to make life easier, but if support more versions is necessary for your project, check out ZenTest’s multiruby features.
Greg recommends using conditional-execution blocks to make version-dependent code look nicer:
if RUBY_VERSION < "1.9" def ruby18 yield end else def ruby18 end end
Greg opines that moving to Ruby 1.9 is not a magic bullet, but has lots of advantages, so try it out!
Ruby 1.8.6 is a workhorse (insert image of beat-up pickup truck). Ruby 1.9 is a Lamborghini (we think). “What the hell is 1.8.7?”
Answer: 1.8.7’s patch set is largely 1.9 backports. It’s a platypus!
However, this doesn’t mean that code written for 1.9 will magically work on 1.8.7. Or that code written for 1.8.7 will work on 1.8.6.
What should authors be doing? Should we release for 1.8.6 or 1.8.7? Greg recommends releasing for 1.9, especially if you’re writing a Ruby book (wink wink).
FFI (Foreign Function Interface) is supported “all over the place”, and is an alternative to writing a C extension. FFI works across implementations (JRuby, Rubinius, and MRI).
On Windows, Greg proclaims that JRuby is the easiest way to wrap a C library. “WTF?”
According to Greg. (Not all of the nuance may be captured here, since Greg was moving pretty quickly. Blame me, not him.)