[DRE-commits] [SCM] ruby-ole.git branch, master, updated. debian/1.2.11.1-6-2-g7677615
Youhei SASAKI
uwabami at gfd-dennou.org
Sat Jan 21 20:08:31 UTC 2012
The following commit has been merged in the master branch:
commit 0fd3258a4ce51dd4779e541a242abf0596038e7f
Author: Youhei SASAKI <uwabami at gfd-dennou.org>
Date: Sun Jan 22 04:56:47 2012 +0900
New upstream release: 1.2.11.2
Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
diff --git a/ChangeLog b/ChangeLog
index 5046a6e..43c9bce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+== 1.2.11.2 / 2011-09-07
+
+- Remove empty dirents after constructing tree (fixes non-contiguous
+ allocation table usage).
+- Fix fallback Symbol#to_proc to match activesupport definition in case
+ we get loaded first (github #2, lazylester).
+- Use method_defined? for fallback guards to support newer versions of
+ ruby (jocker).
+- Add guard on FileTime#initialize to skip for newer versions of ruby.
+ Missing required methods, but optimization no longer relevant
+ anyway (github #4, sagmor).
+
== 1.2.11.1 / 2010-10-24
- Add gemspec and docs to packages so tests can pass again.
diff --git a/lib/ole/storage/base.rb b/lib/ole/storage/base.rb
index 3bde01b..247130d 100644
--- a/lib/ole/storage/base.rb
+++ b/lib/ole/storage/base.rb
@@ -124,7 +124,7 @@ module Ole # :nodoc:
# get block chain for directories, read it, then split it into chunks and load the
# directory entries. semantics changed - used to cut at first dir where dir.type == 0
@dirents = @bbat.read(@header.dirent_start).to_enum(:each_chunk, Dirent::SIZE).
- map { |str| Dirent.new self, str }.reject { |d| d.type_id == 0 }
+ map { |str| Dirent.new self, str }
# now reorder from flat into a tree
# links are stored in some kind of balanced binary tree
@@ -143,6 +143,7 @@ module Ole # :nodoc:
end
@root = @dirents.to_tree.first
+ @dirents.reject! { |d| d.type_id == 0 }
# silence this warning by default, its not really important (issue #5).
# fairly common one appears to be "R" (from office OS X?) which smells
# like some kind of UTF16 snafu, but scottwillson also has had some kanji...
diff --git a/lib/ole/storage/version.rb b/lib/ole/storage/version.rb
index 56c06d9..1b560b1 100644
--- a/lib/ole/storage/version.rb
+++ b/lib/ole/storage/version.rb
@@ -2,7 +2,7 @@
module Ole # :nodoc:
class Storage
- VERSION = '1.2.11.1'
+ VERSION = '1.2.11.2'
end
end
diff --git a/lib/ole/support.rb b/lib/ole/support.rb
index 1c9e6da..e815cc4 100644
--- a/lib/ole/support.rb
+++ b/lib/ole/support.rb
@@ -27,7 +27,7 @@ end
class File # :nodoc:
# for interface consistency with StringIO etc (rather than adding #stat
# to them). used by RangesIO.
- unless File.instance_methods.include?(:size)
+ unless File.method_defined?(:size)
def size
stat.size
end
@@ -35,9 +35,9 @@ class File # :nodoc:
end
class Symbol # :nodoc:
- unless Symbol.instance_methods.include?(:to_proc)
+ unless Symbol.method_defined?(:to_proc)
def to_proc
- proc { |a| a.send self }
+ Proc.new { |*args| args.shift.__send__(self, *args) }
end
end
end
diff --git a/lib/ole/types/base.rb b/lib/ole/types/base.rb
index fb33289..957bdca 100644
--- a/lib/ole/types/base.rb
+++ b/lib/ole/types/base.rb
@@ -76,7 +76,7 @@ module Ole # :nodoc:
# see issue #4.
msg = respond_to?(:new!) ? :new! : :new0
send msg, jd + fr - 0.5, 0, ITALY
- end
+ end if respond_to?(:new!) || respond_to?(:new0)
def self.from_time time
new(*(time.to_a[0, 6].reverse + [time.usec]))
diff --git a/metadata.yml b/metadata.yml
index 4fedd6a..0e20ecb 100644
--- a/metadata.yml
+++ b/metadata.yml
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: ruby-ole
version: !ruby/object:Gem::Version
- hash: 97
+ hash: 103
prerelease: false
segments:
- 1
- 2
- 11
- - 1
- version: 1.2.11.1
+ - 2
+ version: 1.2.11.2
platform: ruby
authors:
- Charles Lowe
@@ -16,7 +16,7 @@ autorequire:
bindir: bin
cert_chain: []
-date: 2010-10-24 00:00:00 -04:00
+date: 2011-09-08 00:00:00 -04:00
default_executable:
dependencies: []
diff --git a/test/test_support.rb b/test/test_support.rb
index e99dee3..11116c5 100755
--- a/test/test_support.rb
+++ b/test/test_support.rb
@@ -44,6 +44,11 @@ class TestSupport < Test::Unit::TestCase
# note not [6, 7] - no overlaps
assert_equal [6], str.indexes('||')
end
+
+ def test_symbol
+ array = (1..10).to_a
+ assert_equal 55, array.inject(&:+)
+ end
end
class TestIOMode < Test::Unit::TestCase
--
ruby-ole.git
More information about the Pkg-ruby-extras-commits
mailing list