Bug #15746

Updated by sandy-lcq (sandy li) about 3 years ago

Below problem is find on 2.5.3 and also 2.6.2.  
 and ruby is compiled from source. and source get from: 

 below test failed: 
 ruby test_delegate.rb 
 ruby test_forwardable.rb 
 ruby test_pstore.rb 
 ruby test_securerandom.rb 
 ruby test_tempfile.rb 
 ruby test_time.rb 
 ruby test_timeout.rb 
 ruby test_tmpdir.rb 
 ruby test_weakref.rb 

 ruby test_extlibs.rb 
 ruby test_open3.rb 
 ruby test_tracer.rb 

 **The top nine mainly failed like:** 

 1.Error: 1.    Error: test_error_handling(TestCMath): 
   NoMethodError: undefined method `assert_raise_with_message' for #<TestCMath:0x000056300b0c5800> 
   Did you mean?    assert_raise_message 

 As I checked,    assert_raise_with_message exist in stdlib 2.1.2    -> Test::Unit::Assertions. 

 but for ruby 2.6.2, Test::Unit::Assertions don't have this method. 

 2.test_cmath.rb:31:in 2.    test_cmath.rb:31:in `test_log' 
 Error: test_log(TestCMath): RangeError: can't convert 0.8047189562170503+1.1071487177940904i into Float 

 As I checked,    assert_in_delta exist in test/unit/assertion.rb, but require argument be float. 

 **above problem can be solved by add "require 'minitest/autorun'"** 

 **The 'minitest/autorun'" 

 The last 3 tests failed like:** like: 
 Traceback (most recent call last): 
	 2: from test_extlibs.rb:2:in `<main>' 
	 1: from /usr/lib64/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 
 /usr/lib64/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- envutil (LoadError) 

 Traceback (most recent call last): 
	 1: from test_open3.rb:8:in `<main>' 
 test_open3.rb:9:in `<class:TestOpen3>': uninitialized constant TestOpen3::EnvUtil (NameError) 

 I checked there is envutil.rb under test/lib/envutil.rb, but envutil is not installed under /usr/lib/ruby/..., 
 so I guess maybe when I compile ruby, I should enable some feature for this?    Could expert at this point it out? Thanks. 
 or Maybe it is a problem of