diff options
author | Wayne Meissner <wmeissner@gmail.com> | 2011-05-07 22:42:56 +1000 |
---|---|---|
committer | Wayne Meissner <wmeissner@gmail.com> | 2011-05-07 22:42:56 +1000 |
commit | 93349d6d56d69fcc9a04c328d145f2ee81591bd0 (patch) | |
tree | 4a191ee5ceb25ec29c69b93440804640e7fc2e8b /spec/ffi | |
parent | b3b303a975f2eaf734316ccf39611141fff4da14 (diff) | |
download | ffi-93349d6d56d69fcc9a04c328d145f2ee81591bd0.tar.gz |
Change FFI::Struct::InlineArray#size to return the number of elements, not the size in bytes, to be consistent with Enumerable
Diffstat (limited to 'spec/ffi')
-rw-r--r-- | spec/ffi/struct_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ffi/struct_spec.rb b/spec/ffi/struct_spec.rb index 8711e99..4c00c93 100644 --- a/spec/ffi/struct_spec.rb +++ b/spec/ffi/struct_spec.rb @@ -584,9 +584,9 @@ describe FFI::Struct, ' with an array field' do # it 'should cache array object for successive calls' do # @s[:a].object_id.should == @s[:a].object_id # end - it 'should return the size of the array field in bytes' do + it 'should return the number of elements in the array field' do @s = LibTest::StructWithArray.new(LibTest.struct_make_struct_with_array(0, 1, 2, 3, 4)) - @s[:a].size.should == 20 + @s[:a].size.should == 5 end it 'should allow iteration through the array elements' do @s = LibTest::StructWithArray.new(LibTest.struct_make_struct_with_array(0, 1, 2, 3, 4)) |