标签: ruby
在某些情况下,Ruby中存在以下区别吗?
class Foo::Bar end
和
module Foo class Bar end end
答案 0 :(得分:1)
第二个例子将定义 Foo 。
第一个示例取决于先前对 Foo 的定义。如果 Foo 尚不存在,它将失败。