Skip to content

Instantly share code, notes, and snippets.

@jballanc
Created January 24, 2009 04:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jballanc/51337 to your computer and use it in GitHub Desktop.
Save jballanc/51337 to your computer and use it in GitHub Desktop.
if $0 == __FILE__
require 'b.rb'
test = TestB.new
test.say
end
class TestA
def say
puts "I'm from library file a.rb"
end
end
if $0 == __FILE__
require 'a'
test = TestA.new
test.say
end
class TestB
def say
puts "I'm from library file b.rb"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment