rtomayko / tilt

Generic interface to multiple Ruby template engines

Home Page:http://github.com/rtomayko/tilt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Haml: ArgumentError: wrong number of arguments (3 for 1..2)

dux opened this issue · comments

when using tilt 2.0.1 with HAML templates

Rack app error: #<ArgumentError: wrong number of arguments (3 for 1..2)>
/gems/haml-4.0.7/lib/haml/engine.rb:54:in `initialize'
/gems/tilt-2.0.1/lib/tilt/mapping.rb:136:in `new'
/gems/tilt-2.0.1/lib/tilt.rb:43:in `new'

using as

Tilt.register Haml::Engine, 'haml'
Tilt.new('./test.haml') -> raise!

reverting to 1.4.1 fixes problem.

this is big issue because all new bundle configs using

gem 'tilt'

without fixing to

gem 'tilt', '1.4.1'

will break on new installas without Gemfile.lock

Tilt ships with its own Haml engine:

Tilt.register Tilt::HamlEngine, 'haml'

Haml::Engine is not a valid Tilt engine.