LumiTrace Playground
Run Ruby in the browser and see traced values inline with lumitrace 0.5.0.
Editor
Idle
def square(n) if n > 0 n > 0 ? n * n : raise else n end end def sum_of_squares(limit) total = 0 (1..limit).each do |i| total += square(i) end total end def report(limit) puts "Squares:" (1..limit).each do |i| puts " #{i}^2 = #{square(i)}" end puts "Sum: #{sum_of_squares(limit)}" end report(5)
Mode
history
last
types
Run
Output
Ready
Annotated