Skip to content

Instantly share code, notes, and snippets.

@cassiomarques
Created March 29, 2016 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cassiomarques/afc9a2abd3a14f9b98b7 to your computer and use it in GitHub Desktop.
Save cassiomarques/afc9a2abd3a14f9b98b7 to your computer and use it in GitHub Desktop.
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