laradji / zabbix

Zabbix chef cookbook
Apache License 2.0
91 stars 124 forks source link

fixed order of operations bug #87

Closed smw1218 closed 11 years ago

smw1218 commented 11 years ago

this code evaluated like gid(node['zabbix']['agent']['gid']) or node['zabbix']['agent']['group']

instead of the expected

gid(node['zabbix']['agent']['gid'] or node['zabbix']['agent']['group'])

the || operator should fixes this because it's got higher precedence.

guilhem commented 11 years ago

shame on me, I didn't know this difference between || and or.

http://devblog.avdi.org/2010/08/02/using-and-and-or-in-ruby/

why ruby... why?..

Thank you @smw1218