Skip to content

Instantly share code, notes, and snippets.

@pedro
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedro/9232897015a43400c041 to your computer and use it in GitHub Desktop.
Save pedro/9232897015a43400c041 to your computer and use it in GitHub Desktop.
wtf rubby
irb(main):018:0> RestClient::VERSION
=> "1.7.3"
irb(main):019:0> RestClient.get("http://test-affinity.herokuapp.com/")
=> "1"
irb(main):020:0> RestClient.get("http://test-affinity.herokuapp.com/").to_i
=> 200
irb(main):021:0> RestClient.get("http://test-affinity.herokuapp.com/").class
=> String
irb(main):022:0> RestClient.get("http://test-affinity.herokuapp.com/") == "1"
=> true
irb(main):023:0> "1".to_i
=> 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment