diff options
author | Benoit Daloze <[email protected]> | 2023-10-30 13:49:46 +0100 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2023-10-30 13:49:46 +0100 |
commit | ab4781b64d945e962575f2eac20b72185235d23b (patch) | |
tree | 9c4456926c1616b0417db0b389371d578876a136 /spec/ruby/library/stringio/new_spec.rb | |
parent | 14fa5e39d72c84d3e12e10dc5d77a6e6200c10f5 (diff) |
Update to ruby/spec@bd7017f
Diffstat (limited to 'spec/ruby/library/stringio/new_spec.rb')
-rw-r--r-- | spec/ruby/library/stringio/new_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/ruby/library/stringio/new_spec.rb b/spec/ruby/library/stringio/new_spec.rb index 328455134e..ec4b32aa11 100644 --- a/spec/ruby/library/stringio/new_spec.rb +++ b/spec/ruby/library/stringio/new_spec.rb @@ -2,7 +2,9 @@ require_relative '../../spec_helper' require 'stringio' describe "StringIO.new" do - it "warns when called with a block" do - -> { eval("StringIO.new {}") }.should complain(/StringIO::new\(\) does not take block; use StringIO::open\(\) instead/) + it "does not use the given block and warns to use StringIO::open" do + -> { + StringIO.new { raise } + }.should complain(/warning: StringIO::new\(\) does not take block; use StringIO::open\(\) instead/) end end |