Unknown regex option pt

Hello,

I am rather new to ruby.I tried to use load ruby.rb in my hello.rb
file.This loads ruby.rb from hello.rb. However, even though I comment
out load ruby.rb, it still loads contents of ruby.rb not hello.rb.I then
deleted everything in the ruby.rb to make sure that it runs only
hello.rb but now I’m getting unknown regex option pt error.

This is a strange error. Do you use a special editor?

Try to use another editor perhaps, write two files.
Try to load it again.

Also post the content of the files in question. What you describe can
not really happen but it is difficult to say what you mean without any
code. For instance, what is the “regex option pt error”? How does it
originate?

You must be doing something and you should tell what you are doing.

The following are my two files:

ruby.rb

file_new = File.new(“temp.out”,“w”)
file_new.puts"This is a test on file open/close .".to_s
file_new.close

read_data = File.read(“temp.out”)

puts "The data read from the file is: "+ read_data


hello.rb

#load ruby.rb

puts “There is nothing important in this file”


But I’m still getting the old ruby.rb file out put when I run hello.rb.

I guess you are not running what you think you are running. Post a
complete transscript of your console session. Prior to running, do a
“cat hello.rb”, so that we can see what is being executed.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs