Skip to content

Commit b871e6d

Browse files
committed
Remove undocumented method #to_c
1 parent cf77d35 commit b871e6d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

core/float.rbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,6 @@ class Float < Numeric
877877
| (?by: Numeric, ?to: Numeric) { (Float) -> void } -> self
878878
| (?by: Numeric, ?to: Numeric) -> Enumerator[Float, self]
879879

880-
def to_c: () -> Complex
881-
882880
# <!--
883881
# rdoc-file=numeric.rb
884882
# - to_f -> self

core/integer.rbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,8 +1195,6 @@ class Integer < Numeric
11951195
def times: () { (Integer) -> void } -> self
11961196
| () -> ::Enumerator[Integer, self]
11971197

1198-
def to_c: () -> Complex
1199-
12001198
# <!--
12011199
# rdoc-file=numeric.c
12021200
# - to_f -> float

core/rational.rbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,6 @@ class Rational < Numeric
405405
| (?by: Numeric, ?to: Numeric) { (Rational) -> void } -> self
406406
| (?by: Numeric, ?to: Numeric) -> Enumerator[Rational, self]
407407

408-
def to_c: () -> Complex
409-
410408
# <!--
411409
# rdoc-file=rational.c
412410
# - rat.to_f -> float

test/stdlib/Numeric_test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,10 @@ def test_abs2
3333
assert_send_type '() -> Float', 1.0, :abs2
3434
assert_send_type '() -> Rational', 1r, :abs2
3535
end
36+
37+
def test_to_c
38+
assert_send_type '() -> Complex', 1, :to_c
39+
assert_send_type '() -> Complex', 1.0, :to_c
40+
assert_send_type '() -> Complex', 1r, :to_c
41+
end
3642
end

0 commit comments

Comments
 (0)