[DRE-commits] [SCM] ruby-ole.git branch, master, updated. debian/1.2.11.1-5-7-gf69f0fe
Gunnar Wolf
gwolf at gwolf.org
Mon Jan 16 06:37:03 UTC 2012
The following commit has been merged in the master branch:
commit f69f0fed5c663cd3c777702c83bf58346cf1a0ea
Author: Gunnar Wolf <gwolf at gwolf.org>
Date: Mon Jan 16 00:33:52 2012 -0600
Fix FTBFS due to a call to a no-longer-provided interface (DateTime#new!) under Ruby 1.9.1 (Closes: #652752)
diff --git a/debian/changelog b/debian/changelog
index b63023a..4244a4e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,10 @@ ruby-ole (1.2.11.1-6) unstable; urgency=low
* Transitional packages should be oldlibs/extra as requested by
lintian
+ * Fix FTBFS due to a call to a no-longer-provided interface
+ (DateTime#new!) under Ruby 1.9.1 (Closes: #652752)
- -- Gunnar Wolf <gwolf at debian.org> Mon, 16 Jan 2012 00:32:36 -0600
+ -- Gunnar Wolf <gwolf at debian.org> Mon, 16 Jan 2012 00:33:27 -0600
ruby-ole (1.2.11.1-5) unstable; urgency=low
diff --git a/debian/patches/dont_use_deprecated_new0 b/debian/patches/dont_use_deprecated_new0
new file mode 100644
index 0000000..136ca28
--- /dev/null
+++ b/debian/patches/dont_use_deprecated_new0
@@ -0,0 +1,31 @@
+Author: Gunnar Wolf <gwolf at 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
diff --git a/debian/patches/series b/debian/patches/series
index 0936176..2163bc2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+dont_use_deprecated_new0
move_propids_location
--
ruby-ole.git
More information about the Pkg-ruby-extras-commits
mailing list