Skip to main content
added 180 characters in body
Source Link
histocrat
  • 22.3k
  • 4
  • 38
  • 80

Ruby

print 'Line1' unless
print 'Line2' unless
print 'Line3' unless
print 'Line4'

Edit: Alternatively,

def method_missing(meth,*)
  puts meth.to_s.sub('print'){}
end

printLine1(
printLine2(
printLine3(
printLine4)))

Ruby

print 'Line1' unless
print 'Line2' unless
print 'Line3' unless
print 'Line4'

Ruby

print 'Line1' unless
print 'Line2' unless
print 'Line3' unless
print 'Line4'

Edit: Alternatively,

def method_missing(meth,*)
  puts meth.to_s.sub('print'){}
end

printLine1(
printLine2(
printLine3(
printLine4)))
Source Link
histocrat
  • 22.3k
  • 4
  • 38
  • 80

Ruby

print 'Line1' unless
print 'Line2' unless
print 'Line3' unless
print 'Line4'