mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
11 lines
363 B
Ruby
11 lines
363 B
Ruby
require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
|
|
|
|
# Create a StringIO to contain the output data
|
|
str_output = StringIO.new
|
|
|
|
# Start a Pry session on the Fixnum 5 using str_output to store the
|
|
# output (not writing to $stdout)
|
|
Pry.start(5, :output => str_output)
|
|
|
|
# Display all the output accumulated during the session
|
|
puts str_output.string
|