lib/scss_lint/engine.rb in scss_lint-0.49.0 vs lib/scss_lint/engine.rb in scss_lint-0.50.0
- old
+ new
@@ -26,14 +26,13 @@
@preprocess_files = options[:preprocess_files]
build(options)
# Need to force encoding to avoid Windows-related bugs.
# Need to encode with universal newline to avoid other Windows-related bugs.
- # Need `to_a` for Ruby 1.9.3.
encoding = 'UTF-8'
@lines = @contents.force_encoding(encoding)
.encode(encoding, universal_newline: true)
- .lines.to_a
+ .lines
@tree = @engine.to_tree
find_any_control_commands
rescue Encoding::UndefinedConversionError, Sass::SyntaxError, ArgumentError => error
if error.is_a?(Encoding::UndefinedConversionError) ||
error.message.match(/invalid.*(byte sequence|character)/i)