summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index 9207c6291d..e1c0145c16 100644
--- a/struct.c
+++ b/struct.c
@@ -1060,7 +1060,7 @@ rb_struct_pos(VALUE s, VALUE *name)
long i;
VALUE idx = *name;
- if (RB_TYPE_P(idx, T_SYMBOL)) {
+ if (SYMBOL_P(idx)) {
return struct_member_pos(s, idx);
}
else if (RB_TYPE_P(idx, T_STRING)) {