rested 0.3.3 → 0.3.4
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/VERSION +1 -1
- data/lib/rested/entity.rb +1 -3
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.4
|
data/lib/rested/entity.rb
CHANGED
@@ -100,10 +100,8 @@ module Rested
|
|
100
100
|
if file.kind_of? String then
|
101
101
|
raise IOError.new("File not found: #{file}") if not File.exists? file
|
102
102
|
file = File.new(file)
|
103
|
-
elsif file.is_a? Tempfile
|
104
|
-
file = File.new(file.path)
|
105
103
|
end
|
106
|
-
return if not file.
|
104
|
+
return if not (file.respond_to?(:read) and file.respond_to?(:pos) and file.respond_to?(:pos=))
|
107
105
|
self.files[name] = file
|
108
106
|
end
|
109
107
|
|