Created
May 9, 2014 04:18
-
-
Save toritori0318/e5f6ab52e44bdd68c70a to your computer and use it in GitHub Desktop.
ruby継承
This file contains 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
module Hoge | |
class Fuga | |
end | |
end | |
module Hoge | |
module Fuga | |
class Piyo | |
end | |
end | |
end | |
class Foo < Hoge::Fuga::Piyo | |
end | |
#$ ruby hoge.rb | |
# hoge.rb:7:in `<module:Hoge>': Fuga is not a module (TypeError) | |
# from hoge.rb:6:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment