Skip to content

Commit

Permalink
Make #precompiled_method_return_value public
Browse files Browse the repository at this point in the history
 Don't port this forward to Haml 5. Use after_preamble option in
 precompiled_with_ambles instead.

 close haml#909.

 Backported from haml@ac290b5
  • Loading branch information
x-yuri committed Aug 3, 2021
1 parent 99cf4e6 commit e288667
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/haml/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,15 @@ def precompiled_with_ambles(local_names)
preamble + locals_code(local_names) + precompiled + postamble
end

private

# Returns the string used as the return value of the precompiled method.
# This method exists so it can be monkeypatched to return modified values.
# This is called by Tilt.
def precompiled_method_return_value
"_erbout"
end

private

def locals_code(names)
names = names.keys if Hash == names

Expand Down

0 comments on commit e288667

Please sign in to comment.