<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,6 +4,8 @@
 
 == rufus-verbs - 0.9    released 2008/04/xx
 
+- bug  #19408 : fopen now returns a instance that has a read() method.
+                problem pointed at by Scott Sproule.
 - bug  #19234 : cookie path checking broken - Fixed.
 - todo #19202 : EndPoint.cookies now readable
 - bug  #19201 : :params not respected when specified in request</diff>
      <filename>CHANGELOG.txt</filename>
    </modified>
    <modified>
      <diff>@@ -3,5 +3,6 @@
 
 == Feedback
 
+Scott Sproule : fopen() result didn't have a read() method
 Maik Schmidt : missing 'rufus-lru'
 </diff>
      <filename>CREDITS.txt</filename>
    </modified>
    <modified>
      <diff>@@ -163,6 +163,8 @@ The Rufus::Verbs module provides as well a &lt;tt&gt;fopen&lt;/tt&gt; method, which mostly f
 
 But it follows redirections (has all the rufus-verbs features). It's provided for when targets are local files or URIs.
 
+This fopen() method makes sure to return an object that has a read() method (like a File instance has).
+
 
 The tests may provide good intel as on 'rufus-verbs' usage as well : http://rufus.rubyforge.org/svn/trunk/verbs/test/
 </diff>
      <filename>README.txt</filename>
    </modified>
    <modified>
      <diff>@@ -113,9 +113,15 @@ module Rufus::Verbs
             if block
                 block.call r
                 return
-            else
-                return r
             end
+
+            class &lt;&lt; r
+                def read
+                    self.body
+                end
+            end unless r.respond_to?(:read)
+
+            return r
         end
 
         raise &quot;can't handle scheme '#{u.scheme}' for #{u.to_s}&quot;</diff>
      <filename>lib/rufus/verbs.rb</filename>
    </modified>
    <modified>
      <diff>@@ -50,4 +50,11 @@ class UriTest &lt; Test::Unit::TestCase
             assert_equal &quot;{}&quot;, res.body.strip
         end
     end
+
+    def test_1
+
+        assert_kind_of String, fopen(&quot;CHANGELOG.txt&quot;).read
+        assert_kind_of String, fopen(&quot;file:CHANGELOG.txt&quot;).read
+        assert_kind_of String, fopen(&quot;http://localhost:7777/items&quot;).read
+    end
 end</diff>
      <filename>test/fopen_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b74b5651fd839631e670f68a9c98cfb3a1a45b6a</id>
    </parent>
  </parents>
  <author>
    <name>John Mettraux</name>
    <email>jmettraux@gmail.com</email>
  </author>
  <url>http://github.com/jmettraux/rufus-verbs/commit/1607d9e0a07a9948131aaf00268ffce71acae4c3</url>
  <id>1607d9e0a07a9948131aaf00268ffce71acae4c3</id>
  <committed-date>2008-04-09T17:26:45-07:00</committed-date>
  <authored-date>2008-04-09T17:26:45-07:00</authored-date>
  <message>making sure that the return of fopen() has a read() method (like a File instance would)</message>
  <tree>a31dfa46974d5351e0c15b2ba45232b06be0e344</tree>
  <committer>
    <name>John Mettraux</name>
    <email>jmettraux@gmail.com</email>
  </committer>
</commit>
