From a931e0b0808657d2755d02a8d2b5974a9a2e370d Mon Sep 17 00:00:00 2001 From: SamW Date: Thu, 23 Nov 2023 21:53:50 -0800 Subject: [PATCH] Add ToR and ToC --- test/stdlib/test_helper.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/stdlib/test_helper.rb b/test/stdlib/test_helper.rb index 0851d5fbe0..67060e3da6 100644 --- a/test/stdlib/test_helper.rb +++ b/test/stdlib/test_helper.rb @@ -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