Skip to content

Instantly share code, notes, and snippets.

@bjhaid
Created September 20, 2013 20:35
Show Gist options
  • Save bjhaid/6643515 to your computer and use it in GitHub Desktop.
Save bjhaid/6643515 to your computer and use it in GitHub Desktop.
Method_missing madness
2.0.0-p247 :002 > m "2","a","b"
=> ["2", "a", "b"]
2.0.0-p247 :003 > (m "2","a","b").class
=> Array
2.0.0-p247 :004 > def method_missing m,*args; args.class; end
=> nil
2.0.0-p247 :005 > m "2","a","b"
/Users/bjhaid/.rvm/scripts/irbrc.rb:32:in `initialize': can't convert String to Fixnum (String#to_int gives Class) (TypeError)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment