diff options
author | Yasuo Honda <yasuo.honda@gmail.com> | 2018-12-22 01:43:05 +0000 |
---|---|---|
committer | Yasuo Honda <yasuo.honda@gmail.com> | 2018-12-23 13:26:20 +0000 |
commit | 05781f1f9c0831d24ab2bf61421fe420967c60fa (patch) | |
tree | e6a014c893c7932953ceb02fabb858de0c4eea52 /activesupport/test | |
parent | f9a5fd52540c6228103af38218e909557b01b17a (diff) | |
download | rails-05781f1f9c0831d24ab2bf61421fe420967c60fa.tar.gz rails-05781f1f9c0831d24ab2bf61421fe420967c60fa.tar.bz2 rails-05781f1f9c0831d24ab2bf61421fe420967c60fa.zip |
No need to handle if FrozenError is available
Rails 6 requires Ruby 2.5, which introduces `FrozenError`
https://docs.ruby-lang.org/en/2.5.0/NEWS.html
Related to #31520
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/abstract_unit.rb | 4 | ||||
-rw-r--r-- | activesupport/test/core_ext/hash_ext_test.rb | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index 168d3655d3..62356e4d46 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -39,8 +39,4 @@ class ActiveSupport::TestCase def jruby_skip(message = "") skip message if defined?(JRUBY_VERSION) end - - def frozen_error_class - Object.const_defined?(:FrozenError) ? FrozenError : RuntimeError - end end diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb index 95fdcb8faf..e8e0a1ae72 100644 --- a/activesupport/test/core_ext/hash_ext_test.rb +++ b/activesupport/test/core_ext/hash_ext_test.rb @@ -395,7 +395,7 @@ class HashExtTest < ActiveSupport::TestCase original.freeze assert_nothing_raised { original.except(:a) } - assert_raise(frozen_error_class) { original.except!(:a) } + assert_raise(FrozenError) { original.except!(:a) } end def test_except_does_not_delete_values_in_original |