> I want to edit a file and re-evaluate arbitrary expressions with a keystroke. Writing the code and then copy/pasting it into a REPL prompt is not sufficient.
This suggests to me you've not spent much time with Pry. Are you aware of this:
It's not perfect - doing it perfect with Ruby is a hard problem, as a method can have been defined and redefined in multiple places. But it works very well.
Better in what way? How is it better than a buffer to put arbitrary code in to get executed?
So far, from what you've pointed at, you seem to have picked the most restrictive simplistic examples of what Pry is capable of as a counter-example to explain why it isn't enough for you, rather than explain what it is you believe is actually missing.
Point is: You have access to much better than the examples you've pointed at with Pry as well.
This suggests to me you've not spent much time with Pry. Are you aware of this:
https://github.com/pry/pry/wiki/Editor-integration
It's not perfect - doing it perfect with Ruby is a hard problem, as a method can have been defined and redefined in multiple places. But it works very well.