summaryrefslogtreecommitdiff
path: root/ext/-test-/st/update/update.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/-test-/st/update/update.c')
-rw-r--r--ext/-test-/st/update/update.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/-test-/st/update/update.c b/ext/-test-/st/update/update.c
index 33db042..0c82a7a 100644
--- a/ext/-test-/st/update/update.c
+++ b/ext/-test-/st/update/update.c
@@ -2,9 +2,9 @@
#include <ruby/st.h>
static int
-update_func(st_data_t key, st_data_t *value, st_data_t arg)
+update_func(st_data_t key, st_data_t *value, st_data_t arg, int existing)
{
- VALUE ret = rb_yield_values(2, (VALUE)key, (VALUE)*value);
+ VALUE ret = rb_yield_values(existing ? 2 : 1, (VALUE)key, (VALUE)*value);
switch (ret) {
case Qfalse:
return ST_STOP;