Skip to content

Commit

Permalink
Merge pull request #813 from ksss/special-const-clone
Browse files Browse the repository at this point in the history
Special consts should't allow clone(freeze: false)
  • Loading branch information
soutaro authored Nov 11, 2021
2 parents f652c7f + 817402f commit 5734ddc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/false_class.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ class FalseClass
def |: (nil) -> false
| (false) -> false
| (untyped obj) -> true

def clone: (?freeze: true?) -> self
end
2 changes: 2 additions & 0 deletions core/nil_class.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,6 @@ class NilClass
def |: (nil) -> false
| (false) -> false
| (untyped obj) -> bool

def clone: (?freeze: true?) -> self
end
2 changes: 2 additions & 0 deletions core/symbol.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,6 @@ class Symbol
| (:ascii | :lithuanian | :turkic) -> Symbol
| (:lithuanian, :turkic) -> Symbol
| (:turkic, :lithuanian) -> Symbol

def clone: (?freeze: true?) -> self
end
2 changes: 2 additions & 0 deletions core/true_class.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ class TrueClass
# or
#
def |: (untyped obj) -> true

def clone: (?freeze: true?) -> self
end

0 comments on commit 5734ddc

Please sign in to comment.