Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Ractor#to_s
() -> ::String
to_s
ractor.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/ractor.rb, line 393
def inspect
loc = __builtin_cexpr! %q{ RACTOR_PTR(self)->loc }
name = __builtin_cexpr! %q{ RACTOR_PTR(self)->name }
id = __builtin_cexpr! %q{ ULL2NUM(rb_ractor_id(RACTOR_PTR(self))) }
status = __builtin_cexpr! %q{
rb_str_new2(RACTOR_PTR(self)->status_ == ractor_terminated ? "terminated" : "running")
}
"#<Ractor:##{id}#{name ? ' '+name : ''}#{loc ? " " + loc : ''} #{status}>"
end
Alias of #inspect