add irbrc capture method to capture stdout

useful for copying