Fix an error on Ruby 2.0
This commit is contained in:
parent
9d4b6187ad
commit
ee9937659d
|
@ -37,9 +37,10 @@ describe Hamlit::Engine do
|
|||
%9
|
||||
HAML
|
||||
rescue Hamlit::SyntaxError => e
|
||||
return unless e.respond_to?(:backtrace_locations)
|
||||
line_number = e.backtrace_locations.first.to_s.match(/:(\d+):/)[1]
|
||||
expect(line_number).to eq('8')
|
||||
if e.respond_to?(:backtrace_locations)
|
||||
line_number = e.backtrace_locations.first.to_s.match(/:(\d+):/)[1]
|
||||
expect(line_number).to eq('8')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue