Hello!

I'm a complete newbie in Ruby's world!

I'm just messing around with codings in disparate arguments.
Here, I'm trying to do a program which takes the text in a .txt file and
changes values by gsub! method!

The snag I'm encountering is when I have to make Ruby understand that it
has to consider the text inside a file!

file = File.open("/R/testo.txt", "r")

text = (file.each {|line| print line }).to_s

text.to_s
text.gsub!(/o/,"*")

That's what I've done, but it limits itself to print the text...!

How can I do?

Thanks a lot!

Cheers

-- 
Posted via http://www.ruby-forum.com/.