Test load command : load « Language Basics « Ruby
- Ruby
- Language Basics
- load
Test load command
//Put this in a.rb:
puts "Hello from a.rb"
//And put this in a file called b.rb:
load 'a'
puts "Hello from b.rb"
load 'a'
puts "Hello again from b.rb"
//Run with ruby b.rb
Related examples in the same category