From 56ff129ee00296693e338368cf98e4c74189bc5a Mon Sep 17 00:00:00 2001 From: jj Date: Fri, 29 Jun 2012 11:25:41 +0200 Subject: [PATCH] ruby: fix enum + base-type --- plugins/ruby/codegen.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ruby/codegen.pl b/plugins/ruby/codegen.pl index 265db47c5..3b11565e8 100755 --- a/plugins/ruby/codegen.pl +++ b/plugins/ruby/codegen.pl @@ -772,7 +772,7 @@ sub render_item_number { $initvalue ||= 'nil' if $typename; $subtype = $item->getAttribute('base-type') if (!$subtype or $subtype eq 'bitfield' or $subtype eq 'enum'); - $subtype = $g->getAttribute('base-type') if ($g); + $subtype ||= $g->getAttribute('base-type') if ($g); $subtype = 'int32_t' if (!$subtype); if ($subtype eq 'int64_t') {