D
Donghui Ouyang
Hello All
I have two source files in the same directory: a.rb and b.rb
The content of a.rb is as follow:
puts "Hello form a.rb"
and b.rb is
load 'a'
puts "Hello from b.rb"
load 'a'
puts 'Hello again from b.rb'
When I run the b.rb, It cause a LoadError: no such file to load
But if I replace 'a' with 'a.rb' in b.rb, the program run successfully.
It really confuse me.
My ruby version: ruby 1.8.6
Thanks in advance for your help!
I have two source files in the same directory: a.rb and b.rb
The content of a.rb is as follow:
puts "Hello form a.rb"
and b.rb is
load 'a'
puts "Hello from b.rb"
load 'a'
puts 'Hello again from b.rb'
When I run the b.rb, It cause a LoadError: no such file to load
But if I replace 'a' with 'a.rb' in b.rb, the program run successfully.
It really confuse me.
My ruby version: ruby 1.8.6
Thanks in advance for your help!