Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
TrueClass#to_s
true.to_s → 'true'
object.c
View on GitHub ↗
VALUE
rb_true_to_s(VALUE obj)
{
return rb_cTrueClass_to_s;
}
Returns string 'true':
Example
true.to_s # => "true"
TrueClass#inspect is an alias for TrueClass#to_s.