Issue #6969 has been reported by Dan Bode.
----------------------------------------
Bug #6969: strings should notify you if you request an invalid string.
https://projects.puppetlabs.com/issues/6969
Author: Dan Bode
Status: Unreviewed
Priority: Normal
Assignee:
Category:
Target version:
Affected Puppet version:
Keywords:
Branch:
below are two examples where I have requested an invalid Puppet::String: Either
with an invalid Puppet::String name or version id.
Both cases return what appears to be a valid Puppet::String, these should
produce some meaningful logging/errors.
<pre>
[root@localhost puppet]# irb
irb(main):001:0> require 'puppet/string'
=> true
irb(main):002:0> string = Puppet::String[:facts, '1.0.0']
=> #<Puppet::String:0xb7875bc4 @version="1.0.0", @name=:facts,
@default_format=:pson>
irb(main):003:0> string.find('foo')
NoMethodError: undefined method `find' for #<Puppet::String:0xb7875bc4>
from (irb):3
from /opt/puppet/lib/ruby/1.8/i386-linux/rbconfig.rb:155
irb(main):004:0> string = Puppet::String[:flahbaba, '1.0.0']
=> #<Puppet::String:0xb786f404 @version="1.0.0", @name=:flahbaba,
@default_format=:pson>
irb(main):005:0>
</pre>
--
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://projects.puppetlabs.com/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.