pub const CONVERSION_METHODS: [(&str, &CStr, ConversionType); 12];
Expand description
Defines the supported Ruby object conversion methods and their metadata.
This constant provides a lookup table for methods used to convert Ruby objects to specific types. It maps method names to their C string equivalents and categorizes them as either implicit conversions or coercions. This is used to facilitate handling of type conversions in Ruby, ensuring consistent behavior for operations like implicit coercion or explicit type casting.
Corresponds to the conversion methods defined in Ruby’s conv_method_tbl
in
object.c
.
Reference: https://github.com/ruby/ruby/blob/v3_4_1/object.c#L3095-L3114