Skip to content

Instantly share code, notes, and snippets.

@pirj pirj/repl.rb
Created Feb 23, 2019

Embed
What would you like to do?
Ruby REPL when `pry` is not there
while(true) do
begin
print '> '
input = STDIN.readline.chop
output = eval(input)
puts "=> #{output}"
rescue StandardError => e
puts "Error: #{e.message}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.