* test/readline/test_readline.rb (TestReadline::replace_stdio):
merged the patch of [ruby-dev:25232] instead of [ruby-dev:25223]. (merged from ruby_1_8 branch) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
941af27490
commit
759410a8c9
@ -1,3 +1,9 @@
|
||||
Thu Sep 22 17:31:48 2005 Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
* test/readline/test_readline.rb (TestReadline::replace_stdio):
|
||||
merged the patch of [ruby-dev:25232] instead of [ruby-dev:25223].
|
||||
(merged from ruby_1_8 branch)
|
||||
|
||||
Wed Sep 21 23:30:44 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (configuration): generalized nmake dependent code.
|
||||
|
@ -62,10 +62,12 @@ class TestReadline < Test::Unit::TestCase
|
||||
private
|
||||
|
||||
def replace_stdio(stdin_path, stdout_path)
|
||||
open(stdin_path, "r"){|stdin|
|
||||
open(stdout_path, "w"){|stdout|
|
||||
orig_stdin = STDIN.dup
|
||||
orig_stdout = STDOUT.dup
|
||||
STDIN.reopen(stdin_path, "r")
|
||||
STDOUT.reopen(stdout_path, "w")
|
||||
STDIN.reopen(stdin)
|
||||
STDOUT.reopen(stdout)
|
||||
begin
|
||||
Readline.input = STDIN
|
||||
Readline.output = STDOUT
|
||||
@ -76,6 +78,8 @@ class TestReadline < Test::Unit::TestCase
|
||||
orig_stdin.close
|
||||
orig_stdout.close
|
||||
end
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user