Skip to content

Instantly share code, notes, and snippets.

@qmx
Created October 31, 2011 15:06
Show Gist options
  • Save qmx/1327691 to your computer and use it in GitHub Desktop.
Save qmx/1327691 to your computer and use it in GitHub Desktop.
ruby-1.8.7-p352 :001 > def one_arg(a); puts "one"; end
=> nil
ruby-1.8.7-p352 :002 > def one_arg(a,b); puts "two"; end
=> nil
ruby-1.8.7-p352 :003 > one_arg(1)
ArgumentError: wrong number of arguments (1 for 2)
from (irb):3:in `evaluate'
from org/jruby/RubyKernel.java:1011:in `eval'
from /Volumes/v2/git/jruby/lib/ruby/1.8/irb.rb:158:in `eval_input'
from /Volumes/v2/git/jruby/lib/ruby/1.8/irb.rb:271:in `signal_status'
from /Volumes/v2/git/jruby/lib/ruby/1.8/irb.rb:155:in `eval_input'
from org/jruby/RubyKernel.java:1337:in `loop'
from org/jruby/RubyKernel.java:1115:in `catch'
from /Volumes/v2/git/jruby/lib/ruby/1.8/irb.rb:154:in `eval_input'
from /Volumes/v2/git/jruby/lib/ruby/1.8/irb.rb:71:in `start'
from org/jruby/RubyKernel.java:1115:in `catch'
from /Volumes/v2/git/jruby/lib/ruby/1.8/irb.rb:70:in `start'
from /Volumes/v2/git/jruby/bin/jirb:13:in `(root)'
ruby-1.8.7-p352 :004 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment