summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'time.c')
-rw-r--r--time.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/time.c b/time.c
index b157f6ff11..8c75b709f5 100644
--- a/time.c
+++ b/time.c
@@ -1317,6 +1317,7 @@ time_mdump(time)
char buf[8];
time_t t;
int i;
+ VALUE str;
GetTimeval(time, tobj);
@@ -1344,7 +1345,13 @@ time_mdump(time)
s = RSHIFT(s, 8);
}
- return rb_str_new(buf, 8);
+ str = rb_str_new(buf, 8);
+ if (FL_TEST(time, FL_EXIVAR)) {
+ rb_copy_generic_ivar(str, time);
+ FL_SET(str, FL_EXIVAR);
+ }
+
+ return str;
}
static VALUE