I'm not sure why but I suspect middleman parses strings that look like time before passing it to plugins, perhaps only in recent versions. In any case, I added a type check, if the value is an instance of Time, parsing is skipped because Time doesn't have .to_s and parsing is not even necessary. If it does happen to be String, (perhaps with older versions of middleman?) the String is parsed to Time as it used to.
I'm not sure why but I suspect middleman parses strings that look like time before passing it to plugins, perhaps only in recent versions. In any case, I added a type check, if the value is an instance of
Time
, parsing is skipped because Time doesn't have.to_s
and parsing is not even necessary. If it does happen to beString
, (perhaps with older versions of middleman?) theString
is parsed toTime
as it used to.