Selected Saturday links

It’s always a little embarassing to realise that two or more consecutive blog postings are nothing more than a collection of links, but that’s the way it is at the moment. Busy-ness, illness and distractedness have all kept me from the blog this week. There aren’t any clear themes in this week’s links either. Chatter around OAuth has continued apace, as have musings about fuzziness, location, time, and the web (represented well by Matt Jones’ piece), but mostly this is the (to be) usual random assortment that have spent more than a few seconds open in my newsreader or web browser ...

Making Time#to_date public in Ruby 1.8.6

I just got caught out by an upgrade to Ruby 1.8.6 and an app which I can’t as yet upgrade to Rails 1.2.3. Ruby 1.8.6 (and 1.9) make the Time#to_date and Time#to_datetime methods private so any code which depends on those methods being public will break. The fix is very easy. I just copied the code from the relevant rails changeset and placed it in my environment.rb file: class Time %w(to_date to_datetime).each do |method| public method if private_instance_methods.include?(method) end end Of course, the ideal is to upgrade to 1.2.3, but that’s not on the cards just yet for this particular project. In the meantime, having to add five lines isn’t too much trouble. ...