Skip to content

Commit

Permalink
Updated builtin.rbs's interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
sampersand committed Aug 18, 2023
1 parent 0fb9315 commit 63d25f3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
8 changes: 0 additions & 8 deletions core/array.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -3920,14 +3920,6 @@ class Array[unchecked out Elem] < Object
def initialize_copy: (self other_ary) -> void
end

interface _ToA[T]
def to_a: () -> Array[T]
end

interface _ToAry[T]
def to_ary: () -> ::Array[T]
end

interface _Rand
def rand: (::Integer max) -> ::Integer
end
Expand Down
36 changes: 28 additions & 8 deletions core/builtin.rbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
interface _ToC
def to_c: () -> Complex
end

interface _ToR
def to_r: () -> Rational
end

interface _ToF
def to_f: () -> Float
end

interface _ToI
def to_i: () -> Integer
end
Expand All @@ -6,26 +18,34 @@ interface _ToInt
def to_int: () -> Integer
end

interface _ToR
def to_r: () -> Rational
end

interface _ToS
def to_s: () -> String
end

interface _ToF
def to_f: () -> Float
end

interface _ToStr
def to_str: () -> String
end

interface _ToSym
def to_sym: () -> Symbol
end

interface _ToH[K, V]
def to_h: () -> Hash[K, V]
end

interface _ToHash[K, V]
def to_hash: () -> Hash[K, V]
end

interface _ToA[T]
def to_a: () -> Array[T]
end

interface _ToAry[T]
def to_ary: () -> Array[T]
end

interface _ToProc
def to_proc: () -> Proc
end
Expand Down

0 comments on commit 63d25f3

Please sign in to comment.