Project

General

Profile

Actions

Bug #5952

closed

コマンドラインモードで CGI.new を 2 回実行すると IOError が発生する

Added by hsbt (Hiroshi SHIBATA) almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3p28 (2012-01-28 revision 34386) [x86_64-darwin11.2.0]
Backport:
[ruby-dev:45160]

Description

=begin
1.9.3p28, trunk で以下のスクリプトを実行すると2回目の CGI.new で パラメータを受け取る時に IOError が発生します。
% cat cli.rb
require 'cgi'
CGI.new
CGI.new

% ruby cli.rb
(offline mode: enter name=value pairs on standard input)
/Users/hsbt/.rbenv/versions/2.0.0-dev/lib/ruby/2.0.0/cgi/core.rb:595:in tty?': closed stream (IOError) from /Users/hsbt/.rbenv/versions/2.0.0-dev/lib/ruby/2.0.0/cgi/core.rb:595:in read_from_cmdline'
from /Users/hsbt/.rbenv/versions/2.0.0-dev/lib/ruby/2.0.0/cgi/core.rb:645:in initialize_query' from /Users/hsbt/.rbenv/versions/2.0.0-dev/lib/ruby/2.0.0/cgi/core.rb:806:in initialize'
from cli.rb:4:in new' from cli.rb:4:in '

1.9.2p290 や 1.8.7p357 ではエラーなく2回パラメータを入力可能です。
=end


Related issues 1 (0 open1 closed)

Related to Backport193 - Backport #5955: Please backport r34409(io.c: skip stdin, which should be readable again.)Closed02/01/2012Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0