зеркало из https://github.com/github/ruby.git
[ruby/reline] Get rid of loading pathname unnecessarily
https://github.com/ruby/reline/commit/9bd54b7f1c
This commit is contained in:
Родитель
d1b06229fa
Коммит
f2435c1508
|
@ -1,5 +1,3 @@
|
|||
require 'pathname'
|
||||
|
||||
class Reline::Config
|
||||
attr_reader :test_mode
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ require 'reline/kill_ring'
|
|||
require 'reline/unicode'
|
||||
|
||||
require 'tempfile'
|
||||
require 'pathname'
|
||||
|
||||
class Reline::LineEditor
|
||||
# TODO: undo
|
||||
|
@ -2145,7 +2144,7 @@ class Reline::LineEditor
|
|||
fp.path
|
||||
}
|
||||
system("#{ENV['EDITOR']} #{path}")
|
||||
@line = Pathname.new(path).read
|
||||
@line = File.read(path)
|
||||
finish
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче