lib/merb-gen/generator.rb in merb-gen-1.0.15 vs lib/merb-gen/generator.rb in merb-gen-1.1.0.pre
- old
+ new
@@ -56,10 +56,10 @@
indent = options[:indent] || 0
text = capture(&block)
modules.each_with_index do |mod, i|
concat((" " * (indent + i)) + "module #{mod}\n", block.binding)
end
- text = text.to_a.map{ |line| (" " * modules.size) + line }.join
+ text = Array(text).map{ |line| (" " * modules.size) + line }.join
concat(text, block.binding)
modules.reverse.each_with_index do |mod, i|
concat((" " * (indent + modules.size - i - 1)) + "end # #{mod}\n", block.binding)
end
end