#329 √ resolved
Ragnar Dahlén

[PATCH] Fix failing CI File#truncate spec

Reported by Ragnar Dahlén | February 15th, 2008 @ 12:31 PM | in 1.0 preview

ftruncate on Linux doesn't set errno to EINVAL on negative length.

Fix by raising error in rubyland.

rubinius 0.8.0 (ruby 1.8.6 compatible) (340b78023) (02/15/2008) [i686-pc-linux-gnu]
Started
 
 
1)
File#truncate raises an Errno::EINVAL if the length argument is not valid FAILED
Expected EINVAL but no exception was raised: 
            Expectation.fail_with at ./mspec/expectations.rb:10
    Object(Proc::Function)#should at ./mspec/expectations/should.rb:6
             Object#__script__ {} at ./spec/ruby/1.8/core/file/truncate_spec.rb:149
                        Proc#call at kernel/core/proc.rb:84
           SpecRunner#describe {} at ./mspec/runner/runner.rb:147
                       Array#each at kernel/core/array.rb:573
              SpecRunner#describe at ./mspec/runner/runner.rb:156
                  Object#describe at ./mspec/runner/object.rb:11
                Object#__script__ at ./spec/ruby/1.8/core/file/truncate_spec.rb:89
         CompiledMethod#as_script at kernel/core/compiled_method.rb:209
              Compile.single_load at kernel/core/compile.rb:221
          Compile.unified_load {} at kernel/core/compile.rb:140
                       Array#each at kernel/core/array.rb:573
             Compile.unified_load at kernel/core/compile.rb:120
              Kernel(Object)#load at kernel/core/compile.rb:371
             Object#__script__ {} at tmp/last_ci.rb:56
                       Array#each at kernel/core/array.rb:573
                Object#__script__ at tmp/last_ci.rb:44
         CompiledMethod#as_script at kernel/core/compiled_method.rb:209
              Compile.single_load at kernel/core/compile.rb:221
      Compile.load_from_extension at kernel/core/compile.rb:298
                Object#__script__ at kernel/loader.rb:185
 
Finished in 140.279937 seconds
 
4796 examples, 17489 expectations, 1 failure, 0 errors

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket