https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112017-05-19T11:21:32ZRuby Issue Tracking SystemRuby master - Feature #13577: Digest.file accidentally receives File object but uses file pathhttps://redmine.ruby-lang.org/issues/13577?journal_id=649472017-05-19T11:21:32ZHanmac (Hans Mackowiak)hanmac@gmx.de
<ul></ul><p>as Sorah did there: <a href="https://github.com/aws/aws-sdk-ruby/pull/1516" class="external">https://github.com/aws/aws-sdk-ruby/pull/1516</a><br>
i would suggest that Digest should try to read file objects directly giving to the #file method if able.</p> Ruby master - Feature #13577: Digest.file accidentally receives File object but uses file pathhttps://redmine.ruby-lang.org/issues/13577?journal_id=649932017-05-20T18:48:47Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/13568">Feature #13568</a>: File#path for O_TMPFILE fds has no meaning</i> added</li></ul> Ruby master - Feature #13577: Digest.file accidentally receives File object but uses file pathhttps://redmine.ruby-lang.org/issues/13577?journal_id=649952017-05-20T18:50:34Znaruse (Yui NARUSE)naruse@airemix.jp
<ul></ul><p>Hanmac (Hans Mackowiak) wrote:</p>
<blockquote>
<p>as Sorah did there: <a href="https://github.com/aws/aws-sdk-ruby/pull/1516" class="external">https://github.com/aws/aws-sdk-ruby/pull/1516</a><br>
i would suggest that Digest should try to read file objects directly giving to the #file method if able.</p>
</blockquote>
<p>Yeah.<br>
It should use pread if it can or simply read then restore the pos.</p>