Bug #538

undefined method `readpartial' for TestFileUtils::Stream

Added by Koichi Sasada almost 7 years ago. Updated over 4 years ago.

[ruby-dev:36124]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
ruby -v: Backport:

Description

=begin
 ささだです.

 test-all で以下のような失敗になります.

1) Error:
test_copy_stream(TestFileUtils):
NoMethodError: undefined method readpartial' for
#<TestFileUtils::Stream:0x0000000503ccf8>
/home/ko1/ruby/trunk/lib/fileutils.rb:473:in
copy_stream'
/home/ko1/ruby/trunk/lib/fileutils.rb:473:in copy_stream'
/home/ko1/ruby/trunk/test/fileutils/test_fileutils.rb:931:in
block (3 levels) in test_copy_stream'
/home/ko1/ruby/trunk/test/fileutils/test_fileutils.rb:930:in open'
/home/ko1/ruby/trunk/test/fileutils/test_fileutils.rb:930:in
block (2 levels) in test_copy_stream'
/home/ko1/ruby/trunk/test/fileutils/test_fileutils.rb:929:in open'
/home/ko1/ruby/trunk/test/fileutils/test_fileutils.rb:929:in
block in test_copy_stream'
/home/ko1/ruby/trunk/test/fileutils/test_fileutils.rb:162:in
block in each_srcdest'
/home/ko1/ruby/trunk/test/fileutils/test_fileutils.rb:161:in
each'
/home/ko1/ruby/trunk/test/fileutils/test_fileutils.rb:161:in
each_srcdest'
/home/ko1/ruby/trunk/test/fileutils/test_fileutils.rb:928:in
test_copy_stream'

5080 tests, 1988879 assertions, 0 failures, 1 errors

# ruby 1.9.0 (2008-09-03 revision 19081) [x86_64-linux]
# での test-all 結果.

--
// SASADA Koichi at atdot dot net
=end

History

#1 Updated by Koichi Sasada almost 7 years ago

  • Assignee set to Nobuyoshi Nakada

=begin

=end

#2 Updated by Nobuyoshi Nakada almost 7 years ago

=begin
なかだです。

At Wed, 3 Sep 2008 18:41:17 +0900,
SASADA Koichi wrote in :

1) Error:
test_copy_stream(TestFileUtils):
NoMethodError: undefined method readpartial' for
#<TestFileUtils::Stream:0x0000000503ccf8>
/home/ko1/ruby/trunk/lib/fileutils.rb:473:in
copy_stream'

FileUtilsではreadpartialは使ってないと思うんですが。それに、テキ
ストモードの扱いに問題があったので、先日IO.copy_streamを使うよう
にしたはずです。

--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦

=end

#3 Updated by Koichi Sasada almost 7 years ago

=begin
 ささだです.

Nobuyoshi Nakada wrote:

なかだです。

At Wed, 3 Sep 2008 18:41:17 +0900,
SASADA Koichi wrote in :

1) Error:
test_copy_stream(TestFileUtils):
NoMethodError: undefined method readpartial' for
#<TestFileUtils::Stream:0x0000000503ccf8>
/home/ko1/ruby/trunk/lib/fileutils.rb:473:in
copy_stream'

FileUtilsではreadpartialは使ってないと思うんですが。それに、テキ
ストモードの扱いに問題があったので、先日IO.copy_streamを使うよう
にしたはずです。

 久々に Ruby のソースを読んでみました.

Index: test/fileutils/test_fileutils.rb
===================================================================
--- test/fileutils/test_fileutils.rb (リビジョン 19146)
+++ test/fileutils/test_fileutils.rb (作業コピー)
@@ -984,6 +984,10 @@ end
def write(str)
@f.write str
end
+
+ def readpartial(args)
+ @f.readpartial(
args)
+ end
end

def test_uptodate?

 こんなのを加えたら通りました.どうしましょう.

--
// SASADA Koichi at atdot dot net

=end

#4 Updated by Nobuyoshi Nakada almost 7 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r19148.
=end

Also available in: Atom PDF