Skip to content

Instantly share code, notes, and snippets.

@jfirebaugh
Created November 2, 2011 23:51
Show Gist options
  • Select an option

  • Save jfirebaugh/1335336 to your computer and use it in GitHub Desktop.

Select an option

Save jfirebaugh/1335336 to your computer and use it in GitHub Desktop.
# ruby-1.9.2-p290
pry(main)> c1 = Complex(2, 0)
=> (2+0i)
pry(main)> c2 = Complex(2, 0.0)
=> (2+0.0i)
pry(main)> Complex(c1).equal?(c1)
=> false
pry(main)> Complex(c2).equal?(c2)
=> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment