Closed waymondo closed 1 year ago
Makes sense.
To make completion work in the "old" debugger, I had to fiddle with the syntax of the sent expression (4873a66a4d9bcdf). I'm guessing it uses a bespoke evaluator or somesuch.
Something similar could be happening here. The current scheme uses eval and a heredoc, and either could be handled a little bit imperfectly by debug
.
I think the primary culprit is that there isn't multi-line support for debug currently (https://github.com/ruby/debug/issues/299). Looking at my output above you can see it tries to eval each line separately, which results in the broken heredoc interpretation, but the actual send region output correctly evals in the middle. I'll mess around with it this week if I have time.
It sounds like the new implementation of ruby-send-region
(just merged to master) might work better here.
very nice! the update seems to work for me, thanks for the ping
It seems to have something to do with the way the eval statement is formatted / executed that I don't totally grok.
Here's an example of the output if I run
(run-ruby)
, rundebugger
in that process, then try to send a region ofrand
to it:It is worth noting that if you invoke
irb
within thedebug
process,(ruby-send-region)
works as expected.