ruby-ole 1.2.11.1 → 1.2.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +12 -0
- data/lib/ole/storage/base.rb +2 -1
- data/lib/ole/storage/version.rb +1 -1
- data/lib/ole/support.rb +3 -3
- data/lib/ole/types/base.rb +1 -1
- data/test/test_support.rb +5 -0
- metadata +4 -4
data/ChangeLog
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
== 1.2.11.2 / 2011-09-07
|
2
|
+
|
3
|
+
- Remove empty dirents after constructing tree (fixes non-contiguous
|
4
|
+
allocation table usage).
|
5
|
+
- Fix fallback Symbol#to_proc to match activesupport definition in case
|
6
|
+
we get loaded first (github #2, lazylester).
|
7
|
+
- Use method_defined? for fallback guards to support newer versions of
|
8
|
+
ruby (jocker).
|
9
|
+
- Add guard on FileTime#initialize to skip for newer versions of ruby.
|
10
|
+
Missing required methods, but optimization no longer relevant
|
11
|
+
anyway (github #4, sagmor).
|
12
|
+
|
1
13
|
== 1.2.11.1 / 2010-10-24
|
2
14
|
|
3
15
|
- Add gemspec and docs to packages so tests can pass again.
|
data/lib/ole/storage/base.rb
CHANGED
@@ -124,7 +124,7 @@ module Ole # :nodoc:
|
|
124
124
|
# get block chain for directories, read it, then split it into chunks and load the
|
125
125
|
# directory entries. semantics changed - used to cut at first dir where dir.type == 0
|
126
126
|
@dirents = @bbat.read(@header.dirent_start).to_enum(:each_chunk, Dirent::SIZE).
|
127
|
-
map { |str| Dirent.new self, str }
|
127
|
+
map { |str| Dirent.new self, str }
|
128
128
|
|
129
129
|
# now reorder from flat into a tree
|
130
130
|
# links are stored in some kind of balanced binary tree
|
@@ -143,6 +143,7 @@ module Ole # :nodoc:
|
|
143
143
|
end
|
144
144
|
|
145
145
|
@root = @dirents.to_tree.first
|
146
|
+
@dirents.reject! { |d| d.type_id == 0 }
|
146
147
|
# silence this warning by default, its not really important (issue #5).
|
147
148
|
# fairly common one appears to be "R" (from office OS X?) which smells
|
148
149
|
# like some kind of UTF16 snafu, but scottwillson also has had some kanji...
|
data/lib/ole/storage/version.rb
CHANGED
data/lib/ole/support.rb
CHANGED
@@ -27,7 +27,7 @@ end
|
|
27
27
|
class File # :nodoc:
|
28
28
|
# for interface consistency with StringIO etc (rather than adding #stat
|
29
29
|
# to them). used by RangesIO.
|
30
|
-
unless File.
|
30
|
+
unless File.method_defined?(:size)
|
31
31
|
def size
|
32
32
|
stat.size
|
33
33
|
end
|
@@ -35,9 +35,9 @@ class File # :nodoc:
|
|
35
35
|
end
|
36
36
|
|
37
37
|
class Symbol # :nodoc:
|
38
|
-
unless Symbol.
|
38
|
+
unless Symbol.method_defined?(:to_proc)
|
39
39
|
def to_proc
|
40
|
-
|
40
|
+
Proc.new { |*args| args.shift.__send__(self, *args) }
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
data/lib/ole/types/base.rb
CHANGED
data/test/test_support.rb
CHANGED
@@ -44,6 +44,11 @@ class TestSupport < Test::Unit::TestCase
|
|
44
44
|
# note not [6, 7] - no overlaps
|
45
45
|
assert_equal [6], str.indexes('||')
|
46
46
|
end
|
47
|
+
|
48
|
+
def test_symbol
|
49
|
+
array = (1..10).to_a
|
50
|
+
assert_equal 55, array.inject(&:+)
|
51
|
+
end
|
47
52
|
end
|
48
53
|
|
49
54
|
class TestIOMode < Test::Unit::TestCase
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-ole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 103
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
9
|
- 11
|
10
|
-
-
|
11
|
-
version: 1.2.11.
|
10
|
+
- 2
|
11
|
+
version: 1.2.11.2
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Charles Lowe
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date:
|
19
|
+
date: 2011-09-08 00:00:00 -04:00
|
20
20
|
default_executable:
|
21
21
|
dependencies: []
|
22
22
|
|