ok, I found it (partially).

It is caused by $stdout.reopen(tempfile) in puppet's execute function
in utils.rb

It's further caused by rb_scan_args in ruby's class.c - did not
investigate why exactly ...

Here is how to reproduce in irb:

require 'tempfile'
t = Tempfile.new("puppet")
begin
    $stderr.reopen(t)
rescue => detail
    puts detail
    puts detail.backtrace
end

[pxmgt1] ruby > ruby test.rb
wrong number of arguments (2 for 1)
test.rb:5:in `respond_to?'
test.rb:5:in `reopen'
test.rb:5

This problem seem only to exists on RHEL4 / Ruby ruby 1.8.7
(2008-05-31 patchlevel 0) [i686-linux]


The way I fixed it just by replacing the following two lines in
utils.rb (puppet):

#$stdout.reopen(output_file)
#$stderr.reopen(error_file)

$stdout.reopen(output_file.path,"w")
$stderr.reopen(error_file.path,"w")





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to