Bug #3852
closed
Added by sorah (Sorah Fukumori) about 14 years ago.
Updated over 13 years ago.
ruby -v:
ruby 1.9.3dev (2010-09-21 trunk 29308) [x86_64-darwin10.4.0]
[ruby-dev:42272]
Description
=begin
test_prime.rb:62が以下のように通りませんでした。
- Error:
test_new(TestPrime):
IOError: not opened for reading
../../test/test_prime.rb:62:in read' ../../test/test_prime.rb:62:in
test_new'
パッチは以下です。
diff --git test/test_prime.rb test/test_prime.rb
index e095a29..dca9295 100644
--- test/test_prime.rb
+++ test/test_prime.rb
@@ -55,7 +55,7 @@ class TestPrime < Test::Unit::TestCase
end
def test_new
- buf = StringIO.new('', 'w')
- Status changed from Open to Feedback
=begin
うーん、再現しませんねぇ。
コード見てもreadしてない気がするし。
=end
=begin
このパッチは無意味でした。なんでこれで通るようになったんだろう。
もう一度試してみたら、make test-allの時にのみ再現します。
このIO系の奴はもう一つあるんだな。
- Failure
test_capture_io(TestMiniTestTestCase) [/Users/sorah/git/ruby/core/test/minitest/test_mini_test.rb:837]:
Expected "bye!\n", not "".
たぶんこれもmake test-allのみ?
--
ruby -v: ruby 1.9.3dev (2010-09-21 trunk 29308) [x86_64-darwin10.4.0]
=end
- Category set to test
- Target version set to 1.9.3
- ruby -v set to ruby 1.9.3dev (2010-09-21 trunk 29308) [x86_64-darwin10.4.0]
=begin
パッチ完成しました。コミットお願いします
diff --git test/test_prime.rb test/test_prime.rb
index e095a29..4662b97 100644
--- test/test_prime.rb
+++ test/test_prime.rb
@@ -58,8 +58,10 @@ class TestPrime < Test::Unit::TestCase
buf = StringIO.new('', 'w')
orig, $stderr = $stderr, buf
-
orig_verbose, $VERBOSE = $VERBOSE, false
enum = Prime.new
assert !buf.string.empty?
-
$VERBOSE = orig_verbose
$stderr = orig
assert enum.respond_to?(:each)
=end
- Status changed from Feedback to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r29316.
Shota, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0