Skip to content

Instantly share code, notes, and snippets.

@s7ephen
Forked from al3x/dup_derp
Created October 21, 2009 19:37
Show Gist options
  • Save s7ephen/215392 to your computer and use it in GitHub Desktop.
Save s7ephen/215392 to your computer and use it in GitHub Desktop.
$ irb
>> 1.class
=> Fixnum
>> 1.respond_to?(:dup)
=> true
>> 1.dup
TypeError: can't dup Fixnum
from (irb):3:in `dup'
from (irb):3
-navi-two:~ s7ephen$ irb -v
irb 0.9.5(05/04/13)
navi-two:~ s7ephen$ ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
navi-two:~ s7ephen$ irb
>> VERSION
=> "1.8.6"
>> "testing".each_char
NoMethodError: undefined method `each_char' for "testing":String
from (irb):2
>> ^Dnavi-two:~ s7ephen$ ri String#each_char
------------------------------------------------------- String#each_char
each_char() {|x| ...}
------------------------------------------------------------------------
(no description...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment