Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding Numeric#to_c

  • Loading branch information...
commit 3fc33fbd1c05682305c8b7f4b55af069daffa6fb 1 parent b695ebb
Jesse Cooke jc00ke authored
4 kernel/common/numeric19.rb
View
@@ -3,6 +3,10 @@ def i
Complex(0, self)
end
+ def to_c
+ Complex(self, 0)
+ end
+
def imag
0
end
3  spec/tags/19/ruby/core/numeric/i_tags.txt
View
@@ -1,3 +0,0 @@
-fails:Numeric#i returns a Complex object
-fails:Numeric#i sets the real part to 0
-fails:Numeric#i sets the imaginary part to self
Please sign in to comment.
Something went wrong with that request. Please try again.