From 31c55301e4c3c84803186d28d2764363b457532f Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 13 Mar 2000 07:18:45 +0000 Subject: 2000-03-13 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- struct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'struct.c') diff --git a/struct.c b/struct.c index 743a2fd7ef..52063ae77f 100644 --- a/struct.c +++ b/struct.c @@ -444,7 +444,7 @@ rb_struct_aref(s, idx) { long i; - if (TYPE(idx) == T_STRING) { + if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) { return rb_struct_aref_id(s, rb_to_id(idx)); } @@ -489,7 +489,7 @@ rb_struct_aset(s, idx, val) { long i; - if (TYPE(idx) == T_STRING) { + if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) { return rb_struct_aset_id(s, rb_to_id(idx), val); } -- cgit v1.2.3