aboutsummaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index cbc40286c2..93c55999c0 100644
--- a/struct.c
+++ b/struct.c
@@ -150,12 +150,13 @@ rb_struct_set(VALUE obj, VALUE val)
VALUE members, slot, fsym;
long i, len;
ID fid = rb_frame_this_func();
+ ID this_func = fid;
members = rb_struct_members(obj);
len = RARRAY_LEN(members);
rb_struct_modify(obj);
fid = rb_id_attrget(fid);
- if (!fid) not_a_member(rb_frame_this_func());
+ if (!fid) not_a_member(this_func);
fsym = ID2SYM(fid);
for (i=0; i<len; i++) {
slot = RARRAY_AREF(members, i);