Skip to content

Commit 467ac42

Browse files
committed
Fix tests for removed Class#initialize
Class#initialize no longer exists, so test_class_initialize falls through to Module#initialize and raises nothing. Skip the rbs stdlib test that still exercises Class.allocate and Class#initialize.
1 parent 52b93b0 commit 467ac42

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

‎test/ruby/test_class.rb‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,6 @@ def test_class_cmp
8383
assert_nil(Class.new <=> 1)
8484
end
8585

86-
def test_class_initialize
87-
assert_raise(TypeError) do
88-
Class.new.instance_eval { initialize }
89-
end
90-
end
91-
9286
def test_instantiate_singleton_class
9387
c = class << Object.new; self; end
9488
assert_raise(TypeError) { c.new }

‎tool/rbs_skip_tests‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ test_TOPDIR(RbConfigSingletonTest) `TOPDIR` is `nil` during CI while RBS type is
4242
# Failing because ObjectSpace.count_nodes has been removed
4343
test_count_nodes(ObjectSpaceTest)
4444

45+
# Class.allocate and Class#initialize have been removed
46+
test_initialize(ClassInstanceTest)
47+
4548
## Unknown failures
4649

4750
# NoMethodError: undefined method 'inspect' for an instance of RBS::UnitTest::Convertibles::ToInt

0 commit comments

Comments
 (0)