Skip to content

Commit

Permalink
Merge pull request #1644 from sampersand/swesterman/23-11-23/add-ToR-…
Browse files Browse the repository at this point in the history
…and-ToC-test-types

Add ToR and ToC
  • Loading branch information
soutaro authored Dec 4, 2023
2 parents 1d5f7ed + 17fb3f9 commit 48c86b7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/stdlib/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,26 @@ def to_f
end
end

class ToR < BlankSlate
def initialize(value = 1r)
@value = value
end

def to_r
@value
end
end

class ToC < BlankSlate
def initialize(value = 1i)
@value = value
end

def to_c
@value
end
end

class ToStr < BlankSlate
def initialize(value = "")
@value = value
Expand Down

0 comments on commit 48c86b7

Please sign in to comment.