Project

General

Profile

Actions

Bug #3852

closed

test_prime.rb:62が通らない

Added by sorah (Sorah Fukumori) about 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 1.9.3dev (2010-09-21 trunk 29308) [x86_64-darwin10.4.0]
Backport:
[ruby-dev:42272]

Description

=begin
test_prime.rb:62が以下のように通りませんでした。

  1. 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')
  • buf = StringIO.new('', 'w+')
    orig, $stderr = $stderr, buf

    enum = Prime.new
    =end


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #3857: OpenSSL::TestUtils.silent が $VERBOSE を戻していないClosed09/22/2010Actions
Actions #1

Updated by naruse (Yui NARUSE) about 12 years ago

  • Status changed from Open to Feedback

=begin
うーん、再現しませんねぇ。
コード見てもreadしてない気がするし。
=end

Actions #2

Updated by sorah (Sorah Fukumori) about 12 years ago

=begin
このパッチは無意味でした。なんでこれで通るようになったんだろう。

もう一度試してみたら、make test-allの時にのみ再現します。
このIO系の奴はもう一つあるんだな。

  1. 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

Actions #3

Updated by znz (Kazuhiro NISHIYAMA) about 12 years ago

  • 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

=end

Actions #4

Updated by sorah (Sorah Fukumori) about 12 years ago

=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

Actions #5

Updated by yugui (Yuki Sonoda) about 12 years ago

  • 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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0