Skip to content

Instantly share code, notes, and snippets.

@yszk0123
Created September 7, 2016 06:09
Show Gist options
  • Save yszk0123/853e88842b9adf99ef5d7cf32e5282ad to your computer and use it in GitHub Desktop.
Save yszk0123/853e88842b9adf99ef5d7cf32e5282ad to your computer and use it in GitHub Desktop.
Ruby 確認用
class A
def self.message
"I'm #{name}"
end
private
def self.name
"A"
end
end
class B < A
private
def self.name
"B"
end
end
raise "assert" unless A.message == "I'm A"
raise "assert" unless B.message == "I'm B"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment