diff --git a/test/irb/type_completion/test_type_analyze.rb b/test/irb/type_completion/test_type_analyze.rb index e3547bf25060b3..c417a8ad120719 100644 --- a/test/irb/type_completion/test_type_analyze.rb +++ b/test/irb/type_completion/test_type_analyze.rb @@ -445,10 +445,8 @@ def test_constant_path assert_call('class A; X=1; class B; X=""; X.', include: String, exclude: Integer) assert_call('class A; X=1; class B; X=""; end; X.', include: Integer, exclude: String) assert_call('class A; class B; X=1; end; end; class A; class B; X.', include: Integer) - if defined?(IRB::VERSION) - assert_call('module IRB; VERSION.', include: String) - assert_call('module IRB; IRB::VERSION.', include: String) - end + assert_call('module IRB; VERSION.', include: String) + assert_call('module IRB; IRB::VERSION.', include: String) assert_call('module IRB; VERSION=1; VERSION.', include: Integer) assert_call('module IRB; VERSION=1; IRB::VERSION.', include: Integer) assert_call('module IRB; module A; VERSION.', include: String) diff --git a/test/irb/type_completion/test_type_completor.rb b/test/irb/type_completion/test_type_completor.rb index 90477f8f9100a1..eed400b3e2d6f6 100644 --- a/test/irb/type_completion/test_type_completor.rb +++ b/test/irb/type_completion/test_type_completor.rb @@ -89,7 +89,7 @@ def test_lvar def test_const assert_completion('Ar', include: 'Array') assert_completion('::Ar', include: 'Array') - assert_completion('IRB::V', include: 'VERSION') if defined?(IRB::VERSION) + assert_completion('IRB::V', include: 'VERSION') assert_completion('FooBar=1; F', include: 'FooBar') assert_completion('::FooBar=1; ::F', include: 'FooBar') assert_doc_namespace('Array', 'Array')