We can keep hiding the evaluation logic inside the Context level, which has always been the convention until #824 was merged recently.
Although not an official API, gems like debug and mission_control-jobs patch Context#evaluate to wrap their own logic around it. This implicit contract was broken after #824, and this change restores it.
In addition to the refactor, I also converted some context-level evaluation tests into integration tests, which are more robust and easier to maintain.
[ruby/irb] Pass statements to Context#evaluate
(https://github.com/ruby/irb/pull/920)
This has a few benefits:
has always been the convention until #824 was merged recently.
debugandmission_control-jobspatch
Context#evaluateto wrap their own logic around it. This implicitcontract was broken after #824, and this change restores it.
In addition to the refactor, I also converted some context-level evaluation
tests into integration tests, which are more robust and easier to maintain.
https://github.com/ruby/irb/commit/b32aee4068