mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Eval using block.binding rather than just block for 1.9 compatibility.
This commit is contained in:
parent
8e1b40e31f
commit
530d226ff6
1 changed files with 2 additions and 2 deletions
|
@ -254,7 +254,7 @@ module Haml
|
|||
# the local variable <tt>foo</tt> would be assigned to "<p>13</p>\n".
|
||||
#
|
||||
def capture_haml(*args, &block)
|
||||
buffer = eval('_hamlout', block) rescue haml_buffer
|
||||
buffer = eval('_hamlout', block.binding) rescue haml_buffer
|
||||
with_haml_buffer(buffer) do
|
||||
position = haml_buffer.buffer.length
|
||||
|
||||
|
@ -412,7 +412,7 @@ END
|
|||
|
||||
# Returns whether or not +block+ is defined directly in a Haml template.
|
||||
def block_is_haml?(block)
|
||||
eval('_hamlout', block)
|
||||
eval('_hamlout', block.binding)
|
||||
true
|
||||
rescue
|
||||
false
|
||||
|
|
Loading…
Add table
Reference in a new issue