aboutsummaryrefslogtreecommitdiffstats
path: root/strftime.c
diff options
context:
space:
mode:
Diffstat (limited to 'strftime.c')
-rw-r--r--strftime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/strftime.c b/strftime.c
index ebb587c379..ec656f6130 100644
--- a/strftime.c
+++ b/strftime.c
@@ -619,11 +619,11 @@ rb_strftime_with_timespec(VALUE ftime, const char *format, size_t format_len,
tp = "UTC";
break;
}
- if (vtm->zone == NULL) {
+ if (NIL_P(vtm->zone)) {
i = 0;
}
else {
- tp = vtm->zone;
+ tp = RSTRING_PTR(vtm->zone);
if (enc) {
for (i = 0; i < TBUFSIZE && tp[i]; i++) {
if ((unsigned char)tp[i] > 0x7F) {