Skip to content

Commit 6f7af11

Browse files
committed
In Temporal#to_s, set @string if it is nil.
1 parent 5a19b1c commit 6f7af11

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/rdf/model/literal/temporal.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def milliseconds?
128128
#
129129
# @return [String]
130130
def to_s
131-
@string || (@object.strftime(self.class.const_get(:FORMAT)).sub('.000', '') + self.tz)
131+
@string ||= (@object.strftime(self.class.const_get(:FORMAT)).sub('.000', '') + self.tz)
132132
end
133133

134134
##

0 commit comments

Comments
 (0)