summaryrefslogtreecommitdiff
path: root/test/ruby/test_env.rb
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_env.rb4
1 files changed, 3 insertions, 1 deletions
@@ -122,9 +122,11 @@ class TestEnv < Test::Unit::TestCase
assert_equal("foo", ENV.fetch("test"))
ENV.delete("test")
feature8649 = '[ruby-core:56062] [Feature #8649]'
- assert_raise_with_message(KeyError, 'key not found: "test"', feature8649) do
ENV.fetch("test")
end
assert_equal("foo", ENV.fetch("test", "foo"))
assert_equal("bar", ENV.fetch("test") { "bar" })
assert_equal("bar", ENV.fetch("test", "foo") { "bar" })