Skip to content

Commit ee2d741

Browse files
authored
changed buffer to be a field access instead of a simple variable (#31)
1 parent 582d448 commit ee2d741

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/ruby_ast_gen/erb_to_ruby_transformer.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class ErbToRubyTransformer
55
def initialize
66
@parser = Temple::ERB::Parser.new
77
@in_control_block = false
8-
@output_tmp_var = "joern__buffer"
8+
@output_tmp_var = "self.joern__buffer"
99
@in_do_block = false
1010
@inner_buffer = "joern__inner_buffer"
1111
@current_counter = 0
@@ -19,7 +19,6 @@ def transform(input)
1919
@output << "#{@output_tmp_var} = \"\""
2020
visit(ast)
2121
flush_static_block
22-
@output << "return #{@output_tmp_var}"
2322

2423
if @in_control_block || @in_do_block
2524
raise ::StandardError, "Invalid ERB Syntax"

0 commit comments

Comments
 (0)