Project

General

Profile

« Previous | Next » 

Revision f1d9e895

Added by st0012 (Stan Lo) over 1 year ago

[ruby/irb] Pass statements to Context#evaluate
(https://github.com/ruby/irb/pull/920)

This has a few benefits:

  • 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.

https://github.com/ruby/irb/commit/b32aee4068