Skip to content

Instantly share code, notes, and snippets.

@porras
Created September 2, 2013 11:16
Show Gist options
  • Save porras/6411792 to your computer and use it in GitHub Desktop.
Save porras/6411792 to your computer and use it in GitHub Desktop.
class A
private
def self.a
:a
end
end
class B
class << self
private
def b
:b
end
end
end
p A.a
p B.b
# :a
# private method `b' called for B:Class (NoMethodError)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment