berkesokhan / rubydotnetcompiler

Automatically exported from code.google.com/p/rubydotnetcompiler
1 stars 0 forks source link

regex not working #77

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
this is my program:

$input_filename = ""
$output_filename = ""

puts "Enter Input FileName:"  
STDOUT.flush  
$input_filename = gets.chomp  

puts "Enter Output Filename:"  
STDOUT.flush  
$output_filename = gets.chomp

OutputFile = File.open($output_filename, "w")

InputFile=File.open($input_filename).each {|line|
 line.gsub!("211","o")
OutputFile.print  line
#~ line.chomp

#~ line.gsub!(/[^[:print:]]/,"")
#~ OutputFile.print  line + "\n"

}

OutputFile.close
InputFile.close

What steps will reproduce the problem?
1. copy the source dode above and save it as an .rb file
2. run the program and provide a file to substitute the value
3. You will see the next error:

EventType : clr20r3     P1 : ruby.exe     P2 : 1.0.0.0     P3 : 4741021b     
P4 : ruby.net.runtime     P5 : 0.9.0.0     P6 : 47410215     P7 : 12a4     
P8 : 35     P9 : system.argumentoutofrange   

What is the expected output? What do you see instead?
substitute the value in the regex in all the lines in the file it matches

What version of the product are you using? On what operating system?
I am using .9 on windows xp sp2

Please provide any additional information below.

Original issue reported on code.google.com by carlos.k...@gmail.com on 9 Apr 2008 at 8:04