Skip to content

Instantly share code, notes, and snippets.

@Fire-Dragon-DoL
Created February 3, 2015 03:01
Show Gist options
  • Save Fire-Dragon-DoL/0f94f930346f43fa38af to your computer and use it in GitHub Desktop.
Save Fire-Dragon-DoL/0f94f930346f43fa38af to your computer and use it in GitHub Desktop.
How does this not become a circular dependency?
require 'b'
module A
end
require 'a'
module A
module B
end
end
$LOAD_PATH << File.expand_path('../', __FILE__)
require 'b'
puts A::B.to_s
puts A.to_s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment