summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/string.c b/string.c
index 552af5c678..210be620c6 100644
--- a/string.c
+++ b/string.c
@@ -8323,14 +8323,7 @@ str_scrub_bang(int argc, VALUE *argv, VALUE str)
static VALUE
sym_find(VALUE dummy, VALUE sym)
{
- ID id = rb_check_id(&sym);
-
- if (id) {
- return ID2SYM(id);
- }
- else {
- return Qnil;
- }
+ return rb_check_symbol(&sym);
}
/*