ruby-changes:53468
From: k0kubun <ko1@a...>
Date: Mon, 12 Nov 2018 16:58:41 +0900 (JST)
Subject: [ruby-changes:53468] k0kubun:r65684 (trunk): erb/new_spec.rb: fix spec failure by other specs
k0kubun 2018-11-12 16:58:29 +0900 (Mon, 12 Nov 2018) New Revision: 65684 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65684 Log: erb/new_spec.rb: fix spec failure by other specs Modified files: trunk/spec/ruby/library/erb/new_spec.rb Index: spec/ruby/library/erb/new_spec.rb =================================================================== --- spec/ruby/library/erb/new_spec.rb (revision 65683) +++ spec/ruby/library/erb/new_spec.rb (revision 65684) @@ -38,9 +38,14 @@ END https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/erb/new_spec.rb#L38 ruby_version_is "2.6" do it "warns invalid trim_mode" do - lambda do - ERBSpecs.new_erb(@eruby_str, trim_mode: '') - end.should output(nil, /Invalid ERB trim mode/) + begin + $VERBOSE, verbose = false, $VERBOSE # Some other specs make $VERBOSE `nil`. + lambda do + ERBSpecs.new_erb(@eruby_str, trim_mode: '') + end.should output(nil, /Invalid ERB trim mode/) + ensure + $VERBOSE = verbose + end end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/