[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:
RubyLex
Context
build_context
test_ruby_lex.rb
https://github.com/ruby/irb/commit/d5b262a076
[ruby/irb] Clear all context usages in RubyLex
(https://github.com/ruby/irb/pull/684)
After this change,
RubyLexwill not interact withContextdirectlyin any way. This decoupling has a few benefits:
RubyLexeasier to test as it no longer has a dependency onContext. We can see this from the removal ofbuild_contextfromtest_ruby_lex.rb.RubyLexeasier to understand as it will not be affectedby state changes in
Contextobjects.RubyLexto be used in places whereContextis not available.https://github.com/ruby/irb/commit/d5b262a076