rhtml
rhtml copied to clipboard
Matching `do` and `end` fails with string or number as last => argument
The following code successfully detects and sets the indentation of the second line
<%= test_method :thing => true, :other_thing => false, :third => :fourth do %>
<% success_method %>
<% end %>
It also succeeds when the value of :third
is a variable (e.g. :third => variable
).
However, when the value of :third
(or any last argument to the method in :key => value
notation) is a string or integer, the indentation fails.
<%= test_method :thing => true, :other_thing => false, :third => "ohno" do %>
<% fail_method %>
<% end %>
<%= test_method :thing => true, :other_thing => false, :third => 0 do %>
<% fail_method %>
<% end %>