Skip to content

Instantly share code, notes, and snippets.

@LTe
Created May 12, 2011 21:17
Show Gist options
  • Save LTe/969463 to your computer and use it in GitHub Desktop.
Save LTe/969463 to your computer and use it in GitHub Desktop.
lite@lite-debian:~$ irb
ruby-1.9.2-p0 > class C; end
=> nil
ruby-1.9.2-p0 > c = C.new
=> #<C:0x00000000becdf0>
ruby-1.9.2-p0 > c.method
ArgumentError: wrong number of arguments(0 for 1)
from (irb):3:in `method'
from (irb):3
from /home/lite/.rvm/rubies/ruby-1.9.2-p0/bin/irb:16:in `<main>'
ruby-1.9.2-p0 > begin
ruby-1.9.2-p0 > c.method
ruby-1.9.2-p0 ?> rescue
ruby-1.9.2-p0 ?> puts "#{c.method}"
ruby-1.9.2-p0 ?> end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment