ruby-changes:37877
From: akr <ko1@a...>
Date: Fri, 13 Mar 2015 12:29:51 +0900 (JST)
Subject: [ruby-changes:37877] akr:r49958 (trunk): * test/readline/test_readline.rb: Restore environment variables:
akr 2015-03-13 12:29:43 +0900 (Fri, 13 Mar 2015) New Revision: 49958 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49958 Log: * test/readline/test_readline.rb: Restore environment variables: COLUMNS LINES Modified files: trunk/ChangeLog trunk/test/readline/test_readline.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 49957) +++ ChangeLog (revision 49958) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Mar 13 12:29:07 2015 Tanaka Akira <akr@f...> + + * test/readline/test_readline.rb: Restore environment variables: + COLUMNS LINES + Fri Mar 13 11:37:46 2015 Nobuyoshi Nakada <nobu@r...> * ext/fiddle/extconf.rb: needs --enable-shared when linked to Index: test/readline/test_readline.rb =================================================================== --- test/readline/test_readline.rb (revision 49957) +++ test/readline/test_readline.rb (revision 49958) @@ -9,8 +9,10 @@ end https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L9 class TestReadline < Test::Unit::TestCase INPUTRC = "INPUTRC" + SAVED_ENV = %w[COLUMNS LINES] def setup + @saved_env = ENV.values_at(*SAVED_ENV) @inputrc, ENV[INPUTRC] = ENV[INPUTRC], IO::NULL end @@ -24,6 +26,7 @@ class TestReadline < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L26 end Readline.input = nil Readline.output = nil + SAVED_ENV.each_with_index {|k, i| ENV[k] = @saved_env[i] } end if !/EditLine/n.match(Readline::VERSION) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/