Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ branches:
only:
- master
script:
- "RUBYOPT='-w' bundle exec rake $TASK"
- bundle exec rake $TASK
env:
- RUBYOPT='-w'
matrix:
include:
- rvm: 2.3.8
Expand All @@ -17,6 +19,8 @@ matrix:
env: TASK=test
- rvm: 2.7.0
env: TASK=test
- rvm: 2.7.0
env: TASK=test RUBYOPT='-w --enable-frozen-string-literal'
- rvm: ruby-head
env: TASK=test
- rvm: jruby-9.2.8.0
Expand Down
1 change: 1 addition & 0 deletions lib/hamlit/compiler/comment_compiler.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Hamlit
class Compiler
class CommentCompiler
Expand Down
1 change: 1 addition & 0 deletions lib/hamlit/filters/markdown.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Hamlit
class Filters
class Markdown < TiltBase
Expand Down
1 change: 1 addition & 0 deletions lib/hamlit/string_splitter.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'ripper'
require 'hamlit/ruby_expression'

Expand Down
4 changes: 2 additions & 2 deletions test/haml/engine_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1783,7 +1783,7 @@ def test_ruby_multiline_with_punctuated_methods_is_continuation
<p>bar</p>
HTML
= ["bar",
" ".strip!,
" ".strip,
"".empty?,
"bang"].join(", ")
%p foo
Expand Down Expand Up @@ -2000,7 +2000,7 @@ def test_convert_template_def_method
end

def test_encoding_error # encoding
render("foo\nbar\nb\xFEaz".force_encoding("utf-8"))
render("foo\nbar\nb\xFEaz".dup.force_encoding("utf-8"))
assert(false, "Expected exception")
rescue Hamlit::Error => e
assert_equal(3, e.line)
Expand Down
2 changes: 1 addition & 1 deletion test/hamlit/engine/attributes_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
it { assert_haml(%q|#b{ id: 'a' }|) }
it { assert_haml(%q|%a{ 'id' => 60 }|) }
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.4.0')
it { assert_haml(%q|%p{class: "a #{"1".concat "2", "3"}"} foo|) }
it { assert_haml(%q|%p{class: "a #{["1", "2", "3"].join}"} foo|) }
end

it { assert_haml(%q|#a{ id: 'b' }(id=id)|, locals: { id: 'c' }) }
Expand Down