diff options
author | Benoit Daloze <[email protected]> | 2022-04-25 14:53:54 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2022-04-25 14:53:54 +0200 |
commit | 45cf4f218728a15eb36d14a6c9912086525f5e3f (patch) | |
tree | 2aa93fadcb904c226f722dde47827098b87a9846 /spec/ruby/core/env/shared | |
parent | 6ae81d49b52563a6720d666a6118ffa6e484f398 (diff) |
Update to ruby/spec@3affe1e
Diffstat (limited to 'spec/ruby/core/env/shared')
-rw-r--r-- | spec/ruby/core/env/shared/update.rb | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/spec/ruby/core/env/shared/update.rb b/spec/ruby/core/env/shared/update.rb index 129a56544c..2746e86545 100644 --- a/spec/ruby/core/env/shared/update.rb +++ b/spec/ruby/core/env/shared/update.rb @@ -39,23 +39,21 @@ describe :env_update, shared: true do ENV["bar"].should == "5" end - ruby_version_is "2.7" do - # BUG: https://bugs.ruby-lang.org/issues/16192 - it "does not evaluate the block when the name is new" do - ENV.delete("bar") - ENV.send @method, {"foo" => "0"} - ENV.send(@method, "bar" => "1") { |key, old, new| fail "Should not get here" } - ENV["bar"].should == "1" - end + # BUG: https://bugs.ruby-lang.org/issues/16192 + it "does not evaluate the block when the name is new" do + ENV.delete("bar") + ENV.send @method, {"foo" => "0"} + ENV.send(@method, "bar" => "1") { |key, old, new| fail "Should not get here" } + ENV["bar"].should == "1" + end - # BUG: https://bugs.ruby-lang.org/issues/16192 - it "does not use the block's return value as the value when the name is new" do - ENV.delete("bar") - ENV.send @method, {"foo" => "0"} - ENV.send(@method, "bar" => "1") { |key, old, new| "Should not use this value" } - ENV["foo"].should == "0" - ENV["bar"].should == "1" - end + # BUG: https://bugs.ruby-lang.org/issues/16192 + it "does not use the block's return value as the value when the name is new" do + ENV.delete("bar") + ENV.send @method, {"foo" => "0"} + ENV.send(@method, "bar" => "1") { |key, old, new| "Should not use this value" } + ENV["foo"].should == "0" + ENV["bar"].should == "1" end it "returns ENV when block given" do |