On 7 April 2010 08:35, Peter Meier <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> > Hrm, okay, but that site seems to suggest that this line shouldn't work:
> >
> > "The following code snippet almost works, but not quite...
> >
> > class MyClass
> > def initialize(options = {:name => 'unknown', :size => 0})"
> >
> > That function definition looks exactly like what we see here:
> >
> > def execute(command, arguments = {:failonfail => true, :combine => true})
> >
> > why do we expect it to work here?
>
> how do you call it? what is the error you get?
>
>
>
Looks legal to me:
10:13:44 rooster:/tmp dev$ cat foo.rb
def execute(command, arguments = {:failonfail => true, :combine => true})
puts "I execute #{command}"
end
execute('/bin/true')
10:13:48 rooster:/tmp dev$ ruby foo.rb
I execute /bin/true
10:14:24 rooster:/tmp dev$ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0
What were you expecting to fail?
Julian.
--
Julian Simpson
Software Build and Deployment
http://www.build-doctor.com
http://twitter.com/builddoctor
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" 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-dev?hl=en.