Last active
December 10, 2015 12:08
-
-
Save bachue/4431862 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# main file | |
def f1 | |
require '2.rb' | |
end | |
def f2 | |
require '2.rb' | |
end | |
f1 | |
f2 | |
# 2.rb | |
puts 'hello world' | |
=> hello world | |
# you can replace 'require' with 'load', it will output 'hello world' twice |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment