Lessons Learned Upgrading Harvest to Ruby 1.9.3
techtime.getharvest.com
techtime.getharvest.com
Also, it shows that a lot of naming problems were actually corrected in the transition to 1.9, like the #type<>#class thing. Less is better and I am grateful that the core team actually made some cuts.
In the end, my personal experience is that upgrading to 1.9 is not that much pain as many say. Sure, for large projects, the work is substantial as an absolute value, but this sounded quite manageable. Sadly, their blogpost on their migration to Rails 3 doesn't mention any numbers in that regard:
http://www.getharvest.com/blog/2011/01/harvest-is-running-ra...
There's a good treatment of this here:
The default splitter for split is newline:
"foo\nbar".split => ["foo", "bar"]
Now possible to get the individual letters as characters in a simple UTF safe way: "foobar".split(//) => ["f", "o", "o", "b", "a", "r"]
I like the stuff that has been done with enumerators, making it possible to map with index etc: "foobar".unpack("U*").enum_for(:each_with_index).map { |x,i| x + i }.pack("U*") => "fpqeew"Rails 3.X is still a tough upgrade though. I'd be curious to see similar benchmarks with upgrading a large code base. I've heard a few stories of abandoned upgrades because of the slowness.
Don't forget to set your envvars!