Having problems with a Ruby script that uses File.Open
Here is the code that I am speaking of...
f = File.open(Socket.gethostname().gsub!(/[[:space:].]/,"")+".log","a")
The issue is the + inside of .open, it is returning a error message saying its a undefined method.
Anyone able to help?
Edit: Here is some code from the class which is causing the problem.
Not sure if this will help though.
def logExecution()
f = File.open(Socket.gethostname().gsub!(/[[:space:].]/,"")+".log","a")
f.puts(" [" + Time.new().to_s() + "] " +\
File.basename($0) + " " + $*.join(" "))
f.close
end