lib/hanami/helpers/html_helper/html_builder.rb in hanami-helpers-1.1.1 vs lib/hanami/helpers/html_helper/html_builder.rb in hanami-helpers-1.1.2

- old
+ new

@@ -158,20 +158,20 @@ class_eval %{ def #{tag}(content = nil, attributes = nil, &blk) @nodes << self.class.html_node.new(:#{tag}, blk || content, attributes || content, options) self end - } + }, __FILE__, __LINE__ - 5 end EMPTY_TAGS.each do |tag| class_eval %{ def #{tag}(attributes = nil) @nodes << EmptyHtmlNode.new(:#{tag}, attributes) self end - } + }, __FILE__, __LINE__ - 5 end include Utils::ClassAttribute class_attribute :html_node @@ -367,10 +367,10 @@ # Resolve the context for nested contents # # @since 0.1.0 # @api private def resolve(&blk) - @context = eval 'self', blk.binding + @context = eval('self', blk.binding, __FILE__, __LINE__) instance_exec(&blk) end end # Forward missing methods to the current context.