> Sure, but Puppet doesn't actually have numbers - it's just that some of its > strings happen to consist entirely of digits. >
Suddenly this whole conversation makes much more sense. ... but some of the Type code suddenly makes much less sense. > > On Feb 17, 2011, at 11:47 PM, Jesse A Wolfe wrote: > > Coincidentally, I found this in the JSON spec: > "Numbers are not quoted. It would be insane to require quotes around > numbers." - http://www.json.org/fatfree.html > > On Thu, Feb 17, 2011 at 3:23 PM, Luke Kanies <l...@puppetlabs.com> wrote: > >> On Feb 17, 2011, at 3:22 PM, Paul Berry wrote: >> >> On Thu, Feb 17, 2011 at 3:17 PM, Luke Kanies <l...@puppetlabs.com> wrote: >> >>> luke@syringe $ ruby -e 'a = "foo"; b = -a' >>> -e:1: undefined method `-@' for "foo":String (NoMethodError) >>> luke@syringe $ >>> >>> >> Yes, but this error doesn't come from Ruby's parser. It is a runtime >> error at the time that Ruby detects that you are trying to apply unary minus >> to a string. Ruby allows unary negation of variables that hold numeric >> values: >> >> [ticket/2.6.next/6338] ~/puppet_labs/puppet$ ruby -e 'a = 3; b = -a; puts >> b' >> -3 >> [ticket/2.6.next/6338] ~/puppet_labs/puppet$ >> >> >> Ah, you're right. I tried a few iterations and they all failed; I didn't >> think to stick to numbers rather than strings, duh. >> >> >> -- >> No matter how rich you become, how famous or powerful, when you die >> the size of your funeral will still pretty much depend on the >> weather. -- Michael Pritchard >> >> >> >> --------------------------------------------------------------------- >> Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199 >> >> >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Developers" group. >> To post to this group, send email to puppet-dev@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-dev+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-dev?hl=en. >> > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To post to this group, send email to puppet-dev@googlegroups.com. > To unsubscribe from this group, send email to > puppet-dev+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. > > > > -- > A nation is a society united by delusions about its ancestry and by > common hatred of its neighbors. -- William Ralph Inge > > --------------------------------------------------------------------- > > Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199 > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To post to this group, send email to puppet-dev@googlegroups.com. > To unsubscribe from this group, send email to > puppet-dev+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.