Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
String.try_convert
(::String object) -> ::String
(::_ToStr object) -> ::String
(untyped object) -> ::String?
String.try_convert(object) → object, new_string, or nil
string.c
View on GitHub ↗
static VALUE
rb_str_s_try_convert(VALUE dummy, VALUE str)
{
return rb_check_string_type(str);
}