diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-23 16:15:21 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-23 16:15:21 +0100 |
commit | cb92de2b2595e0aba5ac34efc98fa3fef6d94487 (patch) | |
tree | cbd2dbaa7f5d30f46fb3f0f095779abbe361731f | |
parent | a6b423787b9d9df618d89468e2573b4d598f011e (diff) | |
download | ffi-efl-cb92de2b2595e0aba5ac34efc98fa3fef6d94487.zip ffi-efl-cb92de2b2595e0aba5ac34efc98fa3fef6d94487.tar.gz |
tools/genruby: ooops fix gen_enums, must use given values
-rwxr-xr-x | tools/genruby.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/genruby.rb b/tools/genruby.rb index baca539..f583677 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -166,9 +166,12 @@ def gen_enums path, indent sym=':'+s.downcase if h.has_key? v h[s]=h[v] - else + elsif v.nil? h[s]=i i+=1 + else + h[s]=v + i=v.to_i+1 end end args = syms.inject(''){|r,s| r+=":#{s.strip.downcase}, #{h[s]}, " } |