Created
March 14, 2014 21:06
-
-
Save erik-megarad/9556917 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):001:0> require 'stringio' | |
=> true | |
irb(main):002:0> StringIO.ancestors | |
=> [StringIO, IO::writable, IO::readable, Enumerable, Data, Object, Kernel, BasicObject] | |
irb(main):003:0> StringIO.ancestors[1] | |
=> IO::writable | |
irb(main):004:0> Object.const_get(StringIO.ancestors[1].to_s) | |
NameError: wrong constant name IO::writable | |
from (irb):4:in `const_get' | |
from (irb):4 | |
from /Users/epeterson/.rubies/ruby-1.9.3-p448/bin/irb:12:in `<main>' | |
irb(main):005:0> IO::writable | |
NoMethodError: undefined method `writable' for IO:Class | |
from (irb):5 | |
from /Users/epeterson/.rubies/ruby-1.9.3-p448/bin/irb:12:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment