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 6be512eaee..2e026fbc7f 100644
--- a/struct.c
+++ b/struct.c
@@ -156,7 +156,8 @@ rb_struct_set(VALUE obj, VALUE val)
for (i=0; i<len; i++) {
slot = RARRAY_AREF(members, i);
if (rb_id_attrset(SYM2ID(slot)) == rb_frame_this_func()) {
- return RSTRUCT_SET(obj, i, val);
+ RSTRUCT_SET(obj, i, val);
+ return val;
}
}
rb_name_error(rb_frame_this_func(), "`%s' is not a struct member",