Project

General

Profile

« Previous | Next » 

Revision b43cc51d

Added by st0012 (Stan Lo) about 2 years ago

[ruby/irb] Clear all context usages in RubyLex
(https://github.com/ruby/irb/pull/684)

After this change, RubyLex will not interact with Context directly
in any way. This decoupling has a few benefits:

  • It makes RubyLex easier to test as it no longer has a dependency on
    Context. We can see this from the removal of build_context from
    test_ruby_lex.rb.
  • It will make RubyLex easier to understand as it will not be affected
    by state changes in Context objects.
  • It allows RubyLex to be used in places where Context is not available.

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