Skip to content

Commit

Permalink
Add missing From_Ruby#is_convertible for Symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
cfisoi committed Dec 9, 2024
1 parent 3ca4ccf commit ccd3ca4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions rice/cpp_api/Symbol.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ namespace Rice::detail
class From_Ruby<Symbol>
{
public:
Convertible is_convertible(VALUE value)
{
switch (rb_type(value))
{
case RUBY_T_SYMBOL:
return Convertible::Exact;
break;
case RUBY_T_STRING:
return Convertible::Exact;
break;
default:
return Convertible::None;
}
}

Symbol convert(VALUE value)
{
return Symbol(value);
Expand Down

0 comments on commit ccd3ca4

Please sign in to comment.