ruby < 2.5 is no longer supported

This commit is contained in:
Akira Matsuda 2019-05-28 05:38:07 +09:00
parent 1da0e25bcf
commit f09ca65e0f
2 changed files with 9 additions and 17 deletions

@ -6,13 +6,8 @@
require "active_support/core_ext/numeric/time"
class DuplicableTest < ActiveSupport::TestCase
if RUBY_VERSION >= "2.5.0"
RAISE_DUP = [method(:puts)]
ALLOW_DUP = ["1", "symbol_from_string".to_sym, Object.new, /foo/, [], {}, Time.now, Class.new, Module.new, BigDecimal("4.56"), nil, false, true, 1, 2.3, Complex(1), Rational(1)]
else
RAISE_DUP = [method(:puts), Complex(1), Rational(1)]
ALLOW_DUP = ["1", "symbol_from_string".to_sym, Object.new, /foo/, [], {}, Time.now, Class.new, Module.new, BigDecimal("4.56"), nil, false, true, 1, 2.3]
end
RAISE_DUP = [method(:puts)]
ALLOW_DUP = ["1", "symbol_from_string".to_sym, Object.new, /foo/, [], {}, Time.now, Class.new, Module.new, BigDecimal("4.56"), nil, false, true, 1, 2.3, Complex(1), Rational(1)]
def test_duplicable
rubinius_skip "* Method#dup is allowed at the moment on Rubinius\n" \

@ -481,17 +481,14 @@ def test_load_raises_load_error_when_file_not_found
end
end
# This raises only on 2.5.. (warns on ..2.4)
if RUBY_VERSION > "2.5"
def test_access_thru_and_upwards_fails
with_autoloading_fixtures do
assert_not defined?(ModuleFolder)
assert_raise(NameError) { ModuleFolder::Object }
assert_raise(NameError) { ModuleFolder::NestedClass::Object }
end
ensure
remove_constants(:ModuleFolder)
def test_access_thru_and_upwards_fails
with_autoloading_fixtures do
assert_not defined?(ModuleFolder)
assert_raise(NameError) { ModuleFolder::Object }
assert_raise(NameError) { ModuleFolder::NestedClass::Object }
end
ensure
remove_constants(:ModuleFolder)
end
def test_non_existing_const_raises_name_error_with_fully_qualified_name