I am still fairly new to ruby, and have been working on a fairly small project.
Ive looked through the online book on ruby central, Why's Poignant guide, and the ruby-doc documentation on both File and IO, but I still can't get the program to work.
Im trying ouput an array containing binary data to a file, the code is:
176: filename = gets
177: aFile = File.new(filename, 'w')
178: @file.each {|element| aFile.print element}
179: aFile.close
@file is an array of bytes, broken into blocks of 500 that Id like to send to the file that Im prompted for.
And those numbers aren't actually there, as they are the line numbers.
The error I get no matter how I format the name of the file is:
project.rb:177:in `initialize': Invalid argument - *whatever_I_just_typed* (Errno::EINVAL)
Does anyone have any Ideas/suggestions on how to get this to work.