Created
March 29, 2016 14:33
-
-
Save cassiomarques/afc9a2abd3a14f9b98b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):014:0> foo = "I am foo" | |
=> "I am foo" | |
irb(main):015:0> foo.is_a? String | |
=> true | |
irb(main):016:0> module Kernel | |
irb(main):017:1> private :is_a? | |
irb(main):018:1> end | |
=> Kernel | |
irb(main):019:0> foo.is_a? String | |
NoMethodError: private method `is_a?' called for "I am foo":String | |
from (irb):19 | |
from /Users/cassiommc/.rbenv/versions/2.2.2/bin/irb:11:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment