ruby-changes:48756
From: nobu <ko1@a...>
Date: Tue, 21 Nov 2017 14:01:34 +0900 (JST)
Subject: [ruby-changes:48756] nobu:r60872 (trunk): fix test_erb.rb [GH-1763]
nobu 2017-11-21 14:01:28 +0900 (Tue, 21 Nov 2017) New Revision: 60872 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60872 Log: fix test_erb.rb [GH-1763] * test/erb/test_erb.rb (test_run): require stringio. suppress an unused variable warning. From: MSP-Greg <MSP-Greg@u...> Modified files: trunk/test/erb/test_erb.rb Index: test/erb/test_erb.rb =================================================================== --- test/erb/test_erb.rb (revision 60871) +++ test/erb/test_erb.rb (revision 60872) @@ -2,6 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/test/erb/test_erb.rb#L2 # frozen_string_literal: false require 'test/unit' require 'erb' +require 'stringio' class TestERB < Test::Unit::TestCase class MyError < RuntimeError ; end @@ -235,6 +236,7 @@ EOS https://github.com/ruby/ruby/blob/trunk/test/erb/test_erb.rb#L236 $stdout = orig out.rewind assert_equal('9', out.read) + return unless num # to remove warning end class Foo; end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/