Skip to content

Commit

Permalink
generate.rb: monkey-implement DateTime#to_time
Browse files Browse the repository at this point in the history
  • Loading branch information
astro committed Jul 16, 2009
1 parent 61702ab commit c11482c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions generate.rb
Expand Up @@ -17,6 +17,12 @@
$stderr.puts "Hpricot not found, will not mangle relative links in <description/>"
end

# Slow monkey patching for recently commented function in Ruby's time library (sigh)
class DateTime
def to_time
Time.parse(to_s)
end
end unless DateTime.instance_methods.include?("to_time")

class LinkAbsolutizer
def initialize(body)
Expand Down

0 comments on commit c11482c

Please sign in to comment.