whats the difference between :: and . in calling methods? like for
File::open and File.open
As I understand, you use :: in invoking the constant of a class like
Another thing is if i type these in IRB, it returns the same result:
But if i type this, i get undefined method error
whereas this is ok:
So the question now is when do I use the :: and when do I use the . ?