From 6c2a551257b31c372d4e34644b9d511b8a6278c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 23 Jan 2012 16:32:16 +0100 Subject: tools/genruby: use eval to compute enum item values --- tools/genruby.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/genruby.rb b/tools/genruby.rb index 77a4fb1..2315da0 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -171,7 +171,7 @@ def gen_enums path, indent i+=1 else h[s]=v - i=v.to_i+1 + i=eval(v).to_i+1 end end args = syms.inject(''){|r,s| r+=":#{s.strip.downcase}, #{h[s]}, " }.sub(/, $/,'') -- cgit v1.1-2-g2b99