diff --git a/core/src/main/java/org/jruby/RubyTime.java b/core/src/main/java/org/jruby/RubyTime.java index ab6e5be0b3a..ef90c2521ed 100644 --- a/core/src/main/java/org/jruby/RubyTime.java +++ b/core/src/main/java/org/jruby/RubyTime.java @@ -1323,11 +1323,11 @@ private RubyString mdump(final Ruby runtime) { if (zone != DateTimeZone.UTC) { long offset = zone.getOffset(dt.getMillis()); string.setInternalVariable("offset", runtime.newFixnum(offset / 1000)); + } - String zoneName = zone.getShortName(dt.getMillis()); - if (!TIME_OFFSET_PATTERN.matcher(zoneName).matches()) { - string.setInternalVariable("zone", runtime.newString(zoneName)); - } + String zoneName = zone.getShortName(dt.getMillis()); + if (!TIME_OFFSET_PATTERN.matcher(zoneName).matches()) { + string.setInternalVariable("zone", RubyString.newUSASCIIString(runtime, zoneName)); } return string;