diff options
author | Julian Langschaedel <meta.rb@gmail.com> | 2013-11-02 01:27:57 +0100 |
---|---|---|
committer | Julian Langschaedel <meta.rb@gmail.com> | 2013-11-02 01:27:57 +0100 |
commit | 1938686c99ec4c7a36cfa996202a00cbfe1dca66 (patch) | |
tree | 6f20677abe91ba5c1f173195da13189bab101858 | |
parent | da32d22d5c613cfc6cb1e310cdb0fc75062fa4d2 (diff) | |
download | ffi-1938686c99ec4c7a36cfa996202a00cbfe1dca66.tar.gz |
cleanup minor typos
-rw-r--r-- | lib/ffi/library.rb | 2 | ||||
-rw-r--r-- | lib/ffi/struct.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/ffi/library.rb b/lib/ffi/library.rb index 1fbaf71..6823712 100644 --- a/lib/ffi/library.rb +++ b/lib/ffi/library.rb @@ -334,7 +334,7 @@ module FFI def self.#{mname} @@ffi_gvar_#{mname} end -code + code else sc = Class.new(FFI::Struct) diff --git a/lib/ffi/struct.rb b/lib/ffi/struct.rb index 6506368..c699e0b 100644 --- a/lib/ffi/struct.rb +++ b/lib/ffi/struct.rb @@ -76,7 +76,7 @@ module FFI end def put(ptr, value) - raise TypeError, "wrong value type (expected #{type.struct_class}" unless value.is_a?(type.struct_class) + raise TypeError, "wrong value type (expected #{type.struct_class})" unless value.is_a?(type.struct_class) ptr.slice(self.offset, self.size).__copy_from__(value.pointer, self.size) end end @@ -258,7 +258,7 @@ module FFI # end # @note Creating a layout from a hash +spec+ is supported only for Ruby 1.9. def layout(*spec) -# raise RuntimeError, "struct layout already defined for #{self.inspect}" if defined?(@layout) + #raise RuntimeError, "struct layout already defined for #{self.inspect}" if defined?(@layout) return @layout if spec.size == 0 builder = StructLayoutBuilder.new |