Author: Gunnar Wolf <gwolf@debian.org>
Origin: vendor
Bug: http://bugs.debian.org/652752
Forwarded: no
Last-Update: 2012-01-16
Description: Fix FTBFS due to a deprecated method call
 FileTime#new overrides DateTime#new by using its faster creator new0
 (previously called new!). That method no longer exists under Ruby
 1.9.x (i.e. see http://bugs.ruby-lang.org/issues/4776), so we revert
 to calling the super function when they are not defined.

Index: ruby-ole/lib/ole/types/base.rb
===================================================================
--- ruby-ole.orig/lib/ole/types/base.rb	2012-01-15 12:52:38.000000000 -0600
+++ ruby-ole/lib/ole/types/base.rb	2012-01-15 23:58:16.000000000 -0600
@@ -60,8 +60,14 @@
 		class FileTime < DateTime
 			SIZE = 8
 
-			# DateTime.new is slow... faster version for FileTime
+			# DateTime.new is slow... If we are running
+			# under Ruby 1.8, we can set up a faster
+			# version for FileTime.
+                        # Ruby 1.9.x no longer offers the new0 / new!
+                        # interface, so we have to use the version from
+                        # DateTime.
 			def self.new year, month, day, hour=0, min=0, sec=0, usec=0
+                                return super unless respond_to?(:new!) or respond_to?(:new0)
 				# DateTime will remove leap and leap-leap seconds
 				sec = 59 if sec > 59
 				if month <= 2
