Unverified Commit 3f7cd468 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #4333 from...

Merge pull request #4333 from shuujii/use-FrozenError-instead-of-RuntimeError-in-frozen-obj-mod-test

Use `FrozenError` instead of `RuntimeError` in frozen object modification test
parents cd3bf55b fbad7a15
......@@ -199,7 +199,7 @@ assert 'Struct#freeze' do
assert_equal :test, o.m
o.freeze
assert_raise(RuntimeError) { o.m = :modify }
assert_raise(RuntimeError) { o[:m] = :modify }
assert_raise(FrozenError) { o.m = :modify }
assert_raise(FrozenError) { o[:m] = :modify }
assert_equal :test, o.m
end
......@@ -239,7 +239,7 @@ assert('Array#pop', '15.2.12.5.21') do
assert_equal([1,2], a)
assert_equal(3, b)
assert_raise(RuntimeError) { [].freeze.pop }
assert_raise(FrozenError) { [].freeze.pop }
end
assert('Array#push', '15.2.12.5.22') do
......@@ -288,7 +288,7 @@ assert('Array#shift', '15.2.12.5.27') do
assert_equal([2,3], a)
assert_equal(1, b)
assert_raise(RuntimeError) { [].freeze.shift }
assert_raise(FrozenError) { [].freeze.shift }
end
assert('Array#size', '15.2.12.5.28') do
......@@ -388,7 +388,7 @@ end
assert('Array#freeze') do
a = [].freeze
assert_raise(RuntimeError) do
assert_raise(FrozenError) do
a[0] = 1
end
end
......@@ -370,7 +370,7 @@ end
assert('Hash#freeze') do
h = {}.freeze
assert_raise(RuntimeError) do
assert_raise(FrozenError) do
h[:a] = 'b'
end
end
......@@ -711,7 +711,7 @@ assert('String#freeze') do
str = "hello"
str.freeze
assert_raise(RuntimeError) { str.upcase! }
assert_raise(FrozenError) { str.upcase! }
end
assert('String literal concatenation') do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment