Issue #1828 has been updated by jamtur01. Status changed from Ready for Testing to Closed Target version set to 0.24.8
Pushed in commit:"73a0757b559d7e4fbd1da43bbcf4e60fd9155896" in branch 0.24.x ---------------------------------------- Bug #1828: Comparison of strings containing versions http://projects.reductivelabs.com/issues/1828 Author: tstoop Status: Closed Priority: Normal Assigned to: jamtur01 Category: language Target version: 0.24.8 Complexity: Trivial Affected version: 0.24.6 Keywords: if language bug integer conversion As discussed on IRC: <pre>class puppet-version-test { if $puppetversion > "0.24.5" { notify { "newer than 0.24.5.": message => "We're newer than 0.24.5.", } } if $puppetversion == "0.24.5" { notify { "0.24.5": message => "We're 0.24.5.", } } if $puppetversion > "0.24.6" { notify { "newer than 0.24.6.": message => "We're newer than 0.24.6.", } } if $puppetversion == "0.24.6" { notify { "0.24.6": message => "We're 0.24.6.", } } if $puppetversion > "0.24.7" { notify { "newer than 0.24.7.": message => "We're newer than 0.24.7.", } } if $puppetversion == "0.24.7" { notify { "0.24.7": message => "We're 0.24.7.", } } if $puppetversion > "0.24.8" { notify { "newer than 0.24.8.": message => "We're newer than 0.24.8.", } } if $puppetversion == "0.24.8" { notify { "0.24.8": message => "We're 0.24.8.", } } notify { "puppetversion": message => $puppetversion, } }</pre> Which gives this output: <pre>otice: We're 0.24.8. notice: //Node[default]/puppet-version-test/Notify[0.24.8]/message: defined 'message' as 'We're 0.24.8.' notice: We're 0.24.7. notice: //Node[default]/puppet-version-test/Notify[0.24.7]/message: defined 'message' as 'We're 0.24.7.' notice: We're 0.24.6. notice: //Node[default]/puppet-version-test/Notify[0.24.6]/message: defined 'message' as 'We're 0.24.6.' notice: We're 0.24.5. notice: //Node[default]/puppet-version-test/Notify[0.24.5]/message: defined 'message' as 'We're 0.24.5.' notice: 0.24.7 notice: //Node[default]/puppet-version-test/Notify[puppetversion]/message: defined 'message' as '0.24.7'</pre> According to masterzen, the string gets converted to a float, which leads to an invalid float which compares 0 to 0. ---------------------------------------- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
