Another tiny performance enhancement.

This commit is contained in:
Matthias Koefferlein 2017-06-17 16:01:09 +02:00
parent b0fbbadd83
commit 7e6dfdf5b4
1 changed files with 5 additions and 1 deletions

View File

@ -198,7 +198,11 @@ rba_safe_string_value (VALUE obj)
VALUE
rba_safe_obj_as_string (VALUE obj)
{
return rba_safe_func (rb_obj_as_string, obj);
if (TYPE(obj) == T_STRING) {
return obj;
} else {
return rba_safe_func (rb_obj_as_string, obj);
}
}
/**