Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User
- def self.foo
- "foo"
- end
- end
- class Post
- puts Post::User.foo
- end
- # => warning: toplevel constant User referenced by Post::User
- # => foo
- module User
- def self.foo
- "foo"
- end
- end
- module Post
- puts Post::User.foo
- end
- # => uninitialized constant Post::User (NameError)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement