From 083ba4ea08fed00ea41f3bdb3b0a2a672ff205d9 Mon Sep 17 00:00:00 2001 From: Kingsley Lewis Date: Tue, 10 Jan 2017 13:57:28 -0800 Subject: [PATCH] fixes for [#3704](https://github.com/crystal-lang/crystal/pull/3704) --- src/crass/sass2scss/converter.cr | 6 ++---- src/crass/sass2scss/converter/file.cr | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/crass/sass2scss/converter.cr b/src/crass/sass2scss/converter.cr index 75da68a..41bc175 100644 --- a/src/crass/sass2scss/converter.cr +++ b/src/crass/sass2scss/converter.cr @@ -1,7 +1,7 @@ module Crass module Sass2Scss - def self.convert(input : T, output : String?, options : Crass::Sass2Scss::Options) + def self.convert(input : (File|String), output : String?, options : Crass::Sass2Scss::Options) case input when File converter = Crass::Sass2Scss::SassFile.new(input, output, options.style) @@ -13,11 +13,9 @@ module Crass class Converter - @input : File|String - getter :scss - def initialize(@input : T, @output : String? = nil, @options : Int32 = 0) + def initialize(@input : (File|String), @output : String? = nil, @options : Int32 = 0) @scss = "" end diff --git a/src/crass/sass2scss/converter/file.cr b/src/crass/sass2scss/converter/file.cr index f955364..7d797c6 100644 --- a/src/crass/sass2scss/converter/file.cr +++ b/src/crass/sass2scss/converter/file.cr @@ -6,7 +6,7 @@ module Crass def initialize(input : File, output : String? = nil, options : Int32 = 0) super lines = [] of String - input.each_line do |line| + input.each_line(false) do |line| lines << line end convert_to_scss(lines.join)