summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
authorS-H-GAMELINKS <gamelinks007@gmail.com>2021-09-02 12:15:21 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-09-11 08:48:56 +0900
commit56065f0686e6798fff2ee7319f0f03026f427c13 (patch)
tree4142c73ad26bf2b25d268d7caeec1255fc438e3b /struct.c
parent9583d2057d1a4d907875ad447dfd64a541e63447 (diff)
downloadruby-56065f0686e6798fff2ee7319f0f03026f427c13.tar.gz
Using SYMBOL_P macro
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)) {