Closed tompng closed 8 months ago
Fixes #674 with refactoring
IRB.rc_files is used for irbrc searching and irb_history searching. I think two separate logic is combined into one and making the code complicated.
IRB.rc_files(ext)
IRB.irb_files
IRB.rc_file(ext)
dirname(ENV['IRBRC'])
ENV['XDG_CONFIG_HOME']
ENV['HOME']
IRB.conf[:RC_NAME_GENERATOR]
I think IRB.conf[: RC_NAME_GENERATOR] is already changed from Proc to Array and released as v1.12.0
IRB.conf[: RC_NAME_GENERATOR]
Fixes #674 with refactoring
IRB.rc_files is used for irbrc searching and irb_history searching. I think two separate logic is combined into one and making the code complicated.
Changes
IRB.rc_files(ext)
toIRB.irb_files
andIRB.rc_file(ext)
dirname(ENV['IRBRC'])
,ENV['XDG_CONFIG_HOME']
orENV['HOME']
IRB.conf[:RC_NAME_GENERATOR]
is removed because it's impossible to configure before loading irbrc