Skip to content

Instantly share code, notes, and snippets.

@JoelQ
Last active November 10, 2018 19:54
4-line Ruby REPL (read eval print loop)
puts "4 line REPL (read eval print loop)"
$stdin.each_line do |line| # READ
return_value = eval(line.chomp) # EVAL
puts return_value # PRINT
end # LOOP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment