If source code is modified while it is running, cute_print causes a "Method call not found (RuntimeError)" stack trace.
require "cute_print"
loop do
ql {1 + 2}
sleep 1
end
While the program is running, edit it. Comment out the "ql" line and save your edits.
...
foo.rb:6: (1 + 2) is 3
foo.rb:6: (1 + 2) is 3
/home/wayne/.rvm/gems/ruby-2.2.0/gems/cute_print-1.0.1/lib/cute_print/ruby_parser/method_call.rb:17:in `call?': undefined method `[]' for nil:NilClass (NoMethodError)
from /home/wayne/.rvm/gems/ruby-2.2.0/gems/cute_print-1.0.1/lib/cute_print/ruby_parser/method_call.rb:13:in `call_to_method?'
from /home/wayne/.rvm/gems/ruby-2.2.0/gems/cute_print-1.0.1/lib/cute_print/ruby_parser/parsed_code.rb:24:in `method_call_node'
from /home/wayne/.rvm/gems/ruby-2.2.0/gems/cute_print-1.0.1/lib/cute_print/ruby_parser/parsed_code.rb:18:in `first_call_to_method'
from /home/wayne/.rvm/gems/ruby-2.2.0/gems/cute_print-1.0.1/lib/cute_print/source_label.rb:21:in `block_code'
from /home/wayne/.rvm/gems/ruby-2.2.0/gems/cute_print-1.0.1/lib/cute_print/source_label.rb:13:in `to_s'
from /home/wayne/.rvm/gems/ruby-2.2.0/gems/cute_print-1.0.1/lib/cute_print/formatter.rb:72:in `join'
from /home/wayne/.rvm/gems/ruby-2.2.0/gems/cute_print-1.0.1/lib/cute_print/formatter.rb:72:in `make_label'
from /home/wayne/.rvm/gems/ruby-2.2.0/gems/cute_print-1.0.1/lib/cute_print/formatter.rb:65:in `label'
from /home/wayne/.rvm/gems/ruby-2.2.0/gems/cute_print-1.0.1/lib/cute_print/formatter.rb:32:in `block in write'
from /home/wayne/.rvm/gems/ruby-2.2.0/gems/cute_print-1.0.1/lib/cute_print/formatter.rb:31:in `write'
from /home/wayne/.rvm/gems/ruby-2.2.0/gems/cute_print-1.0.1/lib/cute_print/printer.rb:61:in `ql'
from /home/wayne/.rvm/gems/ruby-2.2.0/gems/cute_print-1.0.1/lib/cute_print/cute_print.rb:54:in `ql'
from /home/wayne/.rvm/gems/ruby-2.2.0/gems/cute_print-1.0.1/lib/cute_print/mixin.rb:18:in `ql'
from /tmp/foo.rb:6:in `block in <main>'
from /tmp/foo.rb:5:in `loop'
from /tmp/foo.rb:5:in `<main>'