blackwinter-ruby-backports 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -1
- data/lib/backports/digest.rb +24 -0
- data/lib/backports/dir.rb +2 -0
- data/lib/backports/version.rb +1 -1
- metadata +2 -1
data/README
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'digest'
|
2
|
+
|
3
|
+
class Digest::Base
|
4
|
+
|
5
|
+
if RUBY_RELEASE_DATE < '2006-10-25'
|
6
|
+
unless method_defined?(:_backports_file)
|
7
|
+
alias_method :_backports_original_file, :file if method_defined?(:file)
|
8
|
+
|
9
|
+
def file(name)
|
10
|
+
File.open(name, 'rb') { |f|
|
11
|
+
buf = ''
|
12
|
+
while f.read(16384, buf)
|
13
|
+
update buf
|
14
|
+
end
|
15
|
+
}
|
16
|
+
|
17
|
+
self
|
18
|
+
end
|
19
|
+
|
20
|
+
alias_method :_backports_file, :file
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
data/lib/backports/dir.rb
CHANGED
data/lib/backports/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blackwinter-ruby-backports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Wille
|
@@ -27,6 +27,7 @@ files:
|
|
27
27
|
- lib/backports.rb
|
28
28
|
- lib/backports/version.rb
|
29
29
|
- lib/backports/dir.rb
|
30
|
+
- lib/backports/digest.rb
|
30
31
|
- lib/backports/tempfile.rb
|
31
32
|
- COPYING
|
32
33
|
- README
|