lib/to_source/visitor.rb in to_source-0.2.5 vs lib/to_source/visitor.rb in to_source-0.2.6

- old
+ new

@@ -899,11 +899,16 @@ # # @api private # def super(node) z_super(node) + # Stupid hack to ensure super() is emitted, this lib needs a redesign! + arguments = node.arguments + empty = arguments.array.empty? && !arguments.splat && !node.block.kind_of?(Rubinius::AST::BlockPass19) + emit('(') if empty arguments(node) + emit(')') if empty end # Emit concat args # # @param [Rubinius::AST::Node] node @@ -1173,10 +1178,10 @@ # # @api private # def element_reference(node) dispatch(node.receiver) - arguments(node,'[',']') + arguments(node, '[', ']') end # Emit send with arguments # # @param [Rubinius::AST::Node] node