ruby/lib/irb
Stan Lo cb9b885e78 [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
2023-01-14 09:19:09 +00:00
..
cmd [ruby/irb] Store context in RubyLex 2023-01-14 09:19:09 +00:00
ext [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
lc [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
.document [ruby/irb] Exclude useless files from RDoc 2020-02-01 17:03:59 +09:00
color.rb [ruby/irb] Assert lvars_code doesn't include \n 2022-10-18 06:03:23 +00:00
color_printer.rb [ruby/irb] shortcut colorize_code to speedup pretty_print 2022-08-04 08:37:03 +09:00
completion.rb [ruby/irb] Removed Release Version and Revisions for old VCS software 2023-01-11 22:29:09 +00:00
context.rb [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
easter-egg.rb Revert "Prefer #send over #__send__ when it is clear there is no possible conflict" 2020-11-05 20:54:34 +09:00
extend-command.rb [ruby/irb] Avoid calling private methods on the main object 2023-01-12 11:49:16 +00:00
frame.rb [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
help.rb [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
init.rb [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
input-method.rb [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
inspector.rb [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
irb.gemspec Drop Ruby 2.5 support 2022-11-17 13:06:32 +09:00
locale.rb [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
magic-file.rb Don't pollute toplevel by an IRB internal method 2017-06-15 10:43:17 +00:00
notifier.rb [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
output-method.rb [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
ruby-lex.rb [ruby/irb] Store context in RubyLex 2023-01-14 09:19:09 +00:00
ruby_logo.aa [ruby/irb] Discard newlines at end of file 2020-08-28 11:05:18 +09:00
src_encoding.rb Don't pollute toplevel by an IRB internal method 2017-06-15 10:43:17 +00:00
version.rb [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
workspace.rb [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
ws-for-case-2.rb [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00
xmp.rb [ruby/irb] Formatting to header styles 2023-01-11 22:29:10 +00:00