diff options
Diffstat (limited to 'ext/dl/lib/dl/struct.rb')
-rw-r--r-- | ext/dl/lib/dl/struct.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/dl/lib/dl/struct.rb b/ext/dl/lib/dl/struct.rb index 638b095312..d3107fcf50 100644 --- a/ext/dl/lib/dl/struct.rb +++ b/ext/dl/lib/dl/struct.rb @@ -129,6 +129,9 @@ module DL raise(RuntimeError, "invalid element: #{elem}") end _,_,_,ty,enc,dec = @types.encode_type(ty) + if( !ty ) + raise(TypeError, "unsupported type: #{ty}") + end return [name,ty,num,enc,dec] end end # class Struct |