From 7511403d058d6dc505ced2344a78491bd0fe9cc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Tue, 9 Jun 2020 22:12:58 +0200 Subject: [PATCH] Add compatibility with Crystal 0.35.0 --- CHANGELOG.md | 4 ++++ shard.yml | 4 ++-- src/lib/filter/join.cr | 2 +- src/loader.cr | 4 ++-- src/runtime/finalizer.cr | 4 ++-- src/runtime/tuple.cr | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b5ec7f1..e8f8ca3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All notable changes to Crinja will be documented in this file. +## 0.6.1 (2020-06-09) + +Compatibility with Crystal 0.35.0 + ## 0.6.0 (2020-04-03) Compatibility with Crystal 0.34.0 diff --git a/shard.yml b/shard.yml index 6f65dfca..1682c409 100644 --- a/shard.yml +++ b/shard.yml @@ -1,7 +1,7 @@ name: crinja -version: 0.6.0 +version: 0.6.1 license: Apache-2.0 -crystal: 0.34.0 +crystal: 0.35.0 authors: - Johannes Müller diff --git a/src/lib/filter/join.cr b/src/lib/filter/join.cr index dc0d9636..73c356a5 100644 --- a/src/lib/filter/join.cr +++ b/src/lib/filter/join.cr @@ -9,7 +9,7 @@ module Crinja::Filter do_attribute = attribute.truthy? attr_name = attribute.to_s SafeString.build do |io| - target.join(separator, io) do |item| + target.join(io, separator) do |item| if do_attribute item = Resolver.resolve_attribute(attr_name, item) end diff --git a/src/loader.cr b/src/loader.cr index 44cf92d4..87f0088b 100644 --- a/src/loader.cr +++ b/src/loader.cr @@ -61,7 +61,7 @@ abstract class Crinja::Loader def to_s(io) io << "FileSystemLoader(" - searchpaths.join(':', io) + searchpaths.join(io, ':') io << ")" end @@ -123,7 +123,7 @@ abstract class Crinja::Loader # :nodoc: def to_s(io) io << "#" end end diff --git a/src/runtime/finalizer.cr b/src/runtime/finalizer.cr index 0f23557e..9986c91c 100644 --- a/src/runtime/finalizer.cr +++ b/src/runtime/finalizer.cr @@ -53,7 +53,7 @@ struct Crinja::Finalizer protected def stringify(array : Array) @inside_struct = true @io << "[" - array.join(", ", @io) { |item| stringify(item) } + array.join(@io, ", ") { |item| stringify(item) } @io << "]" end @@ -76,7 +76,7 @@ struct Crinja::Finalizer protected def stringify(array : Crinja::Tuple) @inside_struct = true @io << "(" - array.join(", ", @io) { |item| stringify(item) } + array.join(@io, ", ") { |item| stringify(item) } @io << ")" end diff --git a/src/runtime/tuple.cr b/src/runtime/tuple.cr index 1e8ce008..79de5c12 100644 --- a/src/runtime/tuple.cr +++ b/src/runtime/tuple.cr @@ -35,7 +35,7 @@ class Crinja::Tuple def to_s(io) io << "((" - join ", ", io, &.inspect(io) + join io, ", ", &.inspect(io) io << "))" end