diff options
author | Stan Lo <stan001212@gmail.com> | 2023-01-10 20:43:33 +0000 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-01-14 09:19:09 +0000 |
commit | cb9b885e78bb87195d483df1afedf58d0bb81e41 (patch) | |
tree | 1ba732ebb576213869f099b5bcb1b1d33620de16 /string.c | |
parent | 2082ba7c69c1d38508bfa549df3f2980cf8d066d (diff) | |
download | ruby-cb9b885e78bb87195d483df1afedf58d0bb81e41.tar.gz |
[ruby/irb] Store context in RubyLex
Some background for this refactor:
1. Through a RubyLex instance's lifetime, the context passed to its methods
should be the same.
Given that `Context` is only initialised in `Irb#initialize`,
this should be true.
2. When `RubyLex` is initialised, the context object should be accessible.
This is also true in all 3 of `RubyLex.new`'s invocations.
With the above observations, we should be able to store the context in `RubyLex`
as an instance variable. And doing so will make `RubyLex`'s instance methods
easier to use and maintain.
https://github.com/ruby/irb/commit/5c8d3df2df
Diffstat (limited to 'string.c')
0 files changed, 0 insertions, 0 deletions