1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

2000-03-13

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-03-13 07:18:45 +00:00
parent 976692f8ae
commit 31c55301e4
16 changed files with 198 additions and 78 deletions

View file

@ -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);
}