Skip to content

Commit

Permalink
Add ToR and ToC
Browse files Browse the repository at this point in the history
  • Loading branch information
sampersand committed Nov 24, 2023
1 parent 47a57ff commit a931e0b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/stdlib/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,27 @@ 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 a931e0b

Please sign in to comment.